Skip to content

Commit

Permalink
arbnode: init broadcast server before sequencing
Browse files Browse the repository at this point in the history
sequencing attempts to send broadcast messages
this gets stuck if broadcast server isn't started
and deadlocked in case of ForceSequenceDelayed
  • Loading branch information
tsahee committed Nov 1, 2023
1 parent 4c55843 commit f64d4a2
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions arbnode/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -1056,6 +1056,13 @@ func (n *Node) Start(ctx context.Context) error {
return fmt.Errorf("error starting inbox reader: %w", err)
}
}
// broadcastServer must be started befopre sequencing any transactions
if n.BroadcastServer != nil {
err = n.BroadcastServer.Start(ctx)
if err != nil {
return fmt.Errorf("error starting feed broadcast server: %w", err)
}
}
if n.DelayedSequencer != nil && n.SeqCoordinator == nil {
err = n.DelayedSequencer.ForceSequenceDelayed(ctx)
if err != nil {
Expand Down Expand Up @@ -1114,12 +1121,6 @@ func (n *Node) Start(ctx context.Context) error {
if n.L1Reader != nil {
n.L1Reader.Start(ctx)
}
if n.BroadcastServer != nil {
err = n.BroadcastServer.Start(ctx)
if err != nil {
return fmt.Errorf("error starting feed broadcast server: %w", err)
}
}
if n.BroadcastClients != nil {
go func() {
if n.InboxReader != nil {
Expand Down

0 comments on commit f64d4a2

Please sign in to comment.