Skip to content

Commit fbd89be

Browse files
authored
eth/catalyst: always reset timer after sealing error (#33146)
The periodic sealing loop failed to reset its timer when sealBlock returned an error, causing the timer to never fire again and effectively halting block production in developer periodic mode after the first failure. This is a bug because the loop relies on the timer to trigger subsequent sealing attempts, and transient errors (e.g., pool races or chain rewinds) should not permanently stop the loop. The change moves timer.Reset after the sealing attempt unconditionally, ensuring the loop continues ticking and retrying even when sealing fails, which matches how other periodic timers in the codebase behave and preserves forward progress.
1 parent 7755ee3 commit fbd89be

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

eth/catalyst/simulated_beacon.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -280,9 +280,8 @@ func (c *SimulatedBeacon) loop() {
280280
case <-timer.C:
281281
if err := c.sealBlock(c.withdrawals.pop(10), uint64(time.Now().Unix())); err != nil {
282282
log.Warn("Error performing sealing work", "err", err)
283-
} else {
284-
timer.Reset(time.Second * time.Duration(c.period))
285283
}
284+
timer.Reset(time.Second * time.Duration(c.period))
286285
}
287286
}
288287
}

0 commit comments

Comments
 (0)