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() + } } } }()