mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-28 15:46: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 {
|
if executable, _ := a.sim.eth.TxPool().Stats(); executable == 0 {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
// Avoid a race condition where doCommit is closed while in this loop.
|
// Avoids spinlooping if the txPool is alredy terminated.
|
||||||
select {
|
if _, err := a.sim.fallibleCommit(); err != nil {
|
||||||
case _, ok := <-doCommit:
|
break
|
||||||
if !ok {
|
|
||||||
break
|
|
||||||
}
|
|
||||||
default:
|
|
||||||
}
|
}
|
||||||
a.sim.Commit()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue