Also commit the call to fallibleCommit

This commit is contained in:
Pepper Lebeck-Jobe 2025-03-07 13:18:01 +01:00
parent 7fab62da4d
commit f6d5b76b2c
No known key found for this signature in database

View file

@ -70,15 +70,10 @@ func (a *simulatedBeaconAPI) loop() {
if executable, _ := a.sim.eth.TxPool().Stats(); executable == 0 {
break
}
// Avoid a race condition where doCommit is closed while in this loop.
select {
case _, ok := <-doCommit:
if !ok {
break
}
default:
// Avoids spinlooping if the txPool is alredy terminated.
if _, err := a.sim.fallibleCommit(); err != nil {
break
}
a.sim.Commit()
}
}
}()