eth/catalyst: ensure all txs are handled

This commit is contained in:
Martin Holst Swende 2024-08-19 14:59:10 +02:00
parent 191d466528
commit 4cd6aa2809
No known key found for this signature in database
GPG key ID: 683B438C05A5DDF0

View file

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