From 4cd6aa2809fcb45d0a0303fa2d56d053ed0ab1a4 Mon Sep 17 00:00:00 2001 From: Martin Holst Swende Date: Mon, 19 Aug 2024 14:59:10 +0200 Subject: [PATCH] eth/catalyst: ensure all txs are handled --- eth/catalyst/simulated_beacon_api.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/eth/catalyst/simulated_beacon_api.go b/eth/catalyst/simulated_beacon_api.go index 20cf8325ba..da95be18d3 100644 --- a/eth/catalyst/simulated_beacon_api.go +++ b/eth/catalyst/simulated_beacon_api.go @@ -60,7 +60,10 @@ func (a *simulatedBeaconAPI) loop() { for _ = range doCommit { a.sim.Commit() a.sim.eth.TxPool().Sync() - if executable, _ := a.sim.eth.TxPool().Stats(); executable > 0 { + for { + if executable, _ := a.sim.eth.TxPool().Stats(); executable == 0 { + break + } a.sim.Commit() } }