forked from forks/go-ethereum
Merge pull request #31228 from curvegrid/fix-sim-rollback
eth/catalyst: force sync of txpool before clearing subpools in Rollback
This commit is contained in:
commit
cc273cef0b
1 changed files with 3 additions and 0 deletions
|
|
@ -556,6 +556,9 @@ func (p *TxPool) Sync() error {
|
|||
|
||||
// Clear removes all tracked txs from the subpools.
|
||||
func (p *TxPool) Clear() {
|
||||
// Invoke Sync to ensure that txs pending addition don't get added to the pool after
|
||||
// the subpools are subsequently cleared
|
||||
p.Sync()
|
||||
for _, subpool := range p.subpools {
|
||||
subpool.Clear()
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue