eth/catalyst: always reset timer after sealing error (#33146)
Some checks are pending
/ Linux Build (push) Waiting to run
/ Linux Build (arm) (push) Waiting to run
/ Keeper Build (push) Waiting to run
/ Windows Build (push) Waiting to run
/ Docker Image (push) Waiting to run

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.
This commit is contained in:
sashass1315 2025-11-10 19:44:31 +02:00 committed by GitHub
parent 7755ee3e4f
commit fbd89be047
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -280,9 +280,8 @@ func (c *SimulatedBeacon) loop() {
case <-timer.C: case <-timer.C:
if err := c.sealBlock(c.withdrawals.pop(10), uint64(time.Now().Unix())); err != nil { if err := c.sealBlock(c.withdrawals.pop(10), uint64(time.Now().Unix())); err != nil {
log.Warn("Error performing sealing work", "err", err) log.Warn("Error performing sealing work", "err", err)
} else {
timer.Reset(time.Second * time.Duration(c.period))
} }
timer.Reset(time.Second * time.Duration(c.period))
} }
} }
} }