Skip to content

Commit 9b87eda

Browse files
Correct the order TransactionStreamer and PopulateFeedBacklog (#3812) (#3813)
The TransactionStreamer and InboxReader are now needed by PopulateFeedBacklog as of c6bd24a becuase the GetMessage implementation in the transaction streamer needs the InboxReader to have been started so it can get the blobs associated with a message. This is problematic becuase during initialization of the node PopulateFeedBacklog uses the transaction streamer to get messages which were stored in the database when there is a backlog. Fixes: NIT-3997 Co-authored-by: Pepper Lebeck-Jobe <[email protected]>
1 parent ef47e28 commit 9b87eda

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

arbnode/node.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1373,14 +1373,6 @@ func (n *Node) Start(ctx context.Context) error {
13731373
return fmt.Errorf("error initializing feed broadcast server: %w", err)
13741374
}
13751375
}
1376-
if n.InboxTracker != nil && n.BroadcastServer != nil {
1377-
// Even if the sequencer coordinator will populate this backlog,
1378-
// we want to make sure it's populated before any clients connect.
1379-
err = n.InboxTracker.PopulateFeedBacklog(n.BroadcastServer)
1380-
if err != nil {
1381-
return fmt.Errorf("error populating feed backlog on startup: %w", err)
1382-
}
1383-
}
13841376
err = n.TxStreamer.Start(ctx)
13851377
if err != nil {
13861378
return fmt.Errorf("error starting transaction streamer: %w", err)
@@ -1391,6 +1383,14 @@ func (n *Node) Start(ctx context.Context) error {
13911383
return fmt.Errorf("error starting inbox reader: %w", err)
13921384
}
13931385
}
1386+
if n.InboxTracker != nil && n.BroadcastServer != nil {
1387+
// Even if the sequencer coordinator will populate this backlog,
1388+
// we want to make sure it's populated before any clients connect.
1389+
err = n.InboxTracker.PopulateFeedBacklog(n.BroadcastServer)
1390+
if err != nil {
1391+
return fmt.Errorf("error populating feed backlog on startup: %w", err)
1392+
}
1393+
}
13941394
// must init broadcast server before trying to sequence anything
13951395
if n.BroadcastServer != nil {
13961396
err = n.BroadcastServer.Start(ctx)

0 commit comments

Comments
 (0)