diff --git a/eth/catalyst/simulated_beacon_api.go b/eth/catalyst/simulated_beacon_api.go index 6687805315..515908f86c 100644 --- a/eth/catalyst/simulated_beacon_api.go +++ b/eth/catalyst/simulated_beacon_api.go @@ -71,6 +71,10 @@ func (a *simulatedBeaconAPI) loop() { break } a.sim.Commit() + // Avoid a race condition where tx pool is terminated during Commit. + if err := a.sim.eth.TxPool().Sync(); err != nil { + break + } } } }()