core/txpool/legacypool: fix data race of pricedList access (#31758)

This commit is contained in:
Miro 2025-05-03 22:16:33 -04:00 committed by 0g-wh
parent 37691b108f
commit 431df26df6

View file

@ -1934,7 +1934,7 @@ func (pool *LegacyPool) Clear() {
pool.reserver.Release(addr)
}
pool.all.Clear()
pool.priced = newPricedList(pool.all)
pool.priced.Reheap()
pool.pending = make(map[common.Address]*list)
pool.queue = make(map[common.Address]*list)
pool.pendingNonces = newNoncer(pool.currentState)