Skip to content

Commit

Permalink
fix: fixed bug where the unhealthy da event didn't stop block product…
Browse files Browse the repository at this point in the history
…ion (#431)
  • Loading branch information
omritoptix committed Jul 31, 2023
1 parent 6a045ea commit 9e359f6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion da/celestia/celestia_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ func TestSubmitBatch(t *testing.T) {
go func() {
select {
case event := <-HealthSubscription.Out():
healthStatusEvent := event.Data().(da.EventDataDAHealthStatus)
healthStatusEvent := event.Data().(*da.EventDataDAHealthStatus)
assert.Equal(tc.expectedHealthEvent.Healthy, healthStatusEvent.Healthy)
done <- true
break
Expand Down
2 changes: 1 addition & 1 deletion da/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
)

func SubmitBatchHealthEventHelper(pubsubServer *pubsub.Server, ctx context.Context, healthy bool, err error) (ResultSubmitBatch, error) {
err = pubsubServer.PublishWithEvents(ctx, EventDataDAHealthStatus{Healthy: healthy, Error: err},
err = pubsubServer.PublishWithEvents(ctx, &EventDataDAHealthStatus{Healthy: healthy, Error: err},
map[string][]string{EventTypeKey: {EventDAHealthStatus}})
if err != nil {
return ResultSubmitBatch{
Expand Down

0 comments on commit 9e359f6

Please sign in to comment.