Skip to content

Commit

Permalink
fix(settlement): improved logging for settlement batch event (#841)
Browse files Browse the repository at this point in the history
(cherry picked from commit c5b3e07)
  • Loading branch information
omritoptix committed May 10, 2024
1 parent 6606d45 commit 8a3508e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion settlement/dymension/dymension.go
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,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)
Expand Down
6 changes: 6 additions & 0 deletions settlement/events.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package settlement

import (
"fmt"

"github.com/dymensionxyz/dymint/types"
uevent "github.com/dymensionxyz/dymint/utils/event"
)
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 8a3508e

Please sign in to comment.