From 5cd40035997a7c1f398d185cb185a01168b981f6 Mon Sep 17 00:00:00 2001 From: omritoptix Date: Fri, 10 May 2024 11:58:55 +0200 Subject: [PATCH 1/2] Fixed logging for batch accepted event. --- settlement/events.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/settlement/events.go b/settlement/events.go index 4a53098e1..740e5e7ff 100644 --- a/settlement/events.go +++ b/settlement/events.go @@ -1,6 +1,8 @@ package settlement import ( + "fmt" + "github.com/dymensionxyz/dymint/types" uevent "github.com/dymensionxyz/dymint/utils/event" ) @@ -37,6 +39,10 @@ type EventDataNewBatchAccepted struct { StateIndex uint64 } +func (e EventDataNewBatchAccepted) String() string { + return fmt.Sprintf("EndHeight: %d, StateIndex: %d", e.EndHeight, e.StateIndex) +} + type EventDataSequencersListUpdated struct { // Sequencers is the list of new sequencers Sequencers []types.Sequencer From fd0c15ab5d04d68c3afb6c5235f674f3a599ca00 Mon Sep 17 00:00:00 2001 From: omritoptix Date: Fri, 10 May 2024 12:00:52 +0200 Subject: [PATCH 2/2] Changed log level of recieved event. --- settlement/dymension/dymension.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/settlement/dymension/dymension.go b/settlement/dymension/dymension.go index ec67abb0e..2cf5b1d6b 100644 --- a/settlement/dymension/dymension.go +++ b/settlement/dymension/dymension.go @@ -264,7 +264,7 @@ submitLoop: case event := <-subscription.Out(): eventData := event.Data().(*settlement.EventDataNewBatchAccepted) if eventData.EndHeight != batch.EndHeight { - d.logger.Error("Received event for a different batch, ignoring.", "event", eventData) + d.logger.Info("Received event for a different batch, ignoring.", "event", eventData) continue } uevent.MustPublish(d.ctx, d.pubsub, &settlement.EventDataHealth{}, settlement.EventHealthStatusList)