From 9e359f61516ebe1d30f0bc53ac5f6d4c187094f2 Mon Sep 17 00:00:00 2001 From: Omri Date: Mon, 31 Jul 2023 12:35:16 +0200 Subject: [PATCH] fix: fixed bug where the unhealthy da event didn't stop block production (#431) --- da/celestia/celestia_test.go | 2 +- da/utils.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/da/celestia/celestia_test.go b/da/celestia/celestia_test.go index 790564b1c..293602901 100644 --- a/da/celestia/celestia_test.go +++ b/da/celestia/celestia_test.go @@ -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 diff --git a/da/utils.go b/da/utils.go index 84040bfe1..034d55553 100644 --- a/da/utils.go +++ b/da/utils.go @@ -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{