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
  • Loading branch information
omritoptix authored May 10, 2024
1 parent 13f67dd commit c5b3e07
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 @@ -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)
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 c5b3e07

Please sign in to comment.