From 43832e65fd7a0f703a8ff1642108fc70672f8f71 Mon Sep 17 00:00:00 2001 From: jwasinger Date: Tue, 8 Jul 2025 22:15:53 +0900 Subject: [PATCH] eth/catalyst: abort dev mode block commit if shut down is triggered (#32166) alternate approach to https://github.com/ethereum/go-ethereum/pull/31328 suggested by @MariusVanDerWijden . This prevents Geth from outputting a lot of logs when trying to commit on-demand dev mode blocks while the client is shutting down. The issue is hard to reproduce, but I've seen it myself and it is annoying when it happens. I think this is a reasonable simple solution, and we can revisit if we find that the output is still too large (i.e. there is a large delay between initiating shut down and the simulated beacon receiving the signal, while in this loop). Co-authored-by: Marius van der Wijden --- eth/catalyst/simulated_beacon_api.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/eth/catalyst/simulated_beacon_api.go b/eth/catalyst/simulated_beacon_api.go index 6687805315..d0115efaa6 100644 --- a/eth/catalyst/simulated_beacon_api.go +++ b/eth/catalyst/simulated_beacon_api.go @@ -70,7 +70,12 @@ func (a *simulatedBeaconAPI) loop() { if executable, _ := a.sim.eth.TxPool().Stats(); executable == 0 { break } - a.sim.Commit() + select { + case <-a.sim.shutdownCh: + return + default: + a.sim.Commit() + } } } }()