Skip to content

Commit

Permalink
Merge pull request #2054 from OffchainLabs/fix-broadcast-messages
Browse files Browse the repository at this point in the history
Fix Broadcaster BroadcastMessages sequence numbers
  • Loading branch information
PlasmaPower authored Dec 24, 2023
2 parents 492e471 + 11cd4ef commit 8f55e38
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
4 changes: 1 addition & 3 deletions arbnode/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -731,8 +731,6 @@ func CreateNode(
}

func (n *Node) Start(ctx context.Context) error {
// config is the static config at start, not a dynamic config
config := n.configFetcher.Get()
execClient, ok := n.Execution.(*gethexec.ExecutionNode)
if !ok {
execClient = nil
Expand Down Expand Up @@ -764,7 +762,7 @@ func (n *Node) Start(ctx context.Context) error {
return fmt.Errorf("error initializing feed broadcast server: %w", err)
}
}
if n.InboxTracker != nil && n.BroadcastServer != nil && config.Sequencer {
if n.InboxTracker != nil && n.BroadcastServer != nil {
// Even if the sequencer coordinator will populate this backlog,
// we want to make sure it's populated before any clients connect.
err = n.InboxTracker.PopulateFeedBacklog(n.BroadcastServer)
Expand Down
4 changes: 2 additions & 2 deletions broadcaster/broadcaster.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@ func (b *Broadcaster) BroadcastMessages(messages []arbostypes.MessageWithMetadat
}
}()
var feedMessages []*m.BroadcastFeedMessage
for _, msg := range messages {
bfm, err := b.NewBroadcastFeedMessage(msg, seq)
for i, msg := range messages {
bfm, err := b.NewBroadcastFeedMessage(msg, seq+arbutil.MessageIndex(i))
if err != nil {
return err
}
Expand Down

0 comments on commit 8f55e38

Please sign in to comment.