From 4d27fd589e3c7ad22775d710fc97eb9dc834f48a Mon Sep 17 00:00:00 2001 From: Jared Wasinger Date: Tue, 8 Jul 2025 19:04:34 +0900 Subject: [PATCH] eth/catalyst: abort dev mode block commit if shut down is triggered 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() + } } } }()