Skip to content

Commit 6f5bcf6

Browse files
authored
cl: fix for periodic retry of not-ready response (#18374) (#18376)
cherry-pick of #18374 --- when exec responds with !ready (say due to pruning) Caplin should try again before it gives up that seems to be the intent in the code but the implementation has a bug - it uses a `Timer` instead of a `Ticker` we're getting missed (orphaned) blocks due to this
1 parent 3717a8c commit 6f5bcf6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cl/phase1/stages/chain_tip_sync.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ func waitForExecutionEngineToBeFinished(ctx context.Context, cfg *Cfg) (ready bo
2222

2323
// Setup the timers
2424
readyTimeout := time.NewTimer(10 * time.Second)
25-
readyInterval := time.NewTimer(50 * time.Millisecond)
25+
readyInterval := time.NewTicker(50 * time.Millisecond)
2626

2727
// Ensure the timers are stopped to release resources
2828
defer readyTimeout.Stop()

0 commit comments

Comments
 (0)