mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-05-04 07:12:54 +00:00
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.
|
// Clear removes all tracked txs from the subpools.
|
||||||
func (p *TxPool) Clear() {
|
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 {
|
for _, subpool := range p.subpools {
|
||||||
subpool.Clear()
|
subpool.Clear()
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue