mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-27 15:16:43 +00:00
Also commit the call to fallibleCommit
This commit is contained in:
parent
7fab62da4d
commit
f6d5b76b2c
1 changed files with 3 additions and 8 deletions
|
|
@ -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()
|
||||
}
|
||||
}
|
||||
}()
|
||||
|
|
|
|||
Loading…
Reference in a new issue