1
0
Fork 0
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:
jwasinger 2025-03-27 18:40:15 +01:00 committed by GitHub
commit cc273cef0b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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()
}