Skip to content

Commit cc273ce

Browse files
authored
Merge pull request #31228 from curvegrid/fix-sim-rollback
eth/catalyst: force sync of txpool before clearing subpools in Rollback
2 parents 6143c35 + 18faa25 commit cc273ce

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

core/txpool/txpool.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -556,6 +556,9 @@ func (p *TxPool) Sync() error {
556556

557557
// Clear removes all tracked txs from the subpools.
558558
func (p *TxPool) Clear() {
559+
// Invoke Sync to ensure that txs pending addition don't get added to the pool after
560+
// the subpools are subsequently cleared
561+
p.Sync()
559562
for _, subpool := range p.subpools {
560563
subpool.Clear()
561564
}

0 commit comments

Comments
 (0)