mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-26 22:56:43 +00:00
core/txpool/legacypool: clear both pending and queue in Clear()
This commit is contained in:
parent
32169a27e9
commit
52d8e1e904
1 changed files with 5 additions and 0 deletions
|
|
@ -1913,6 +1913,11 @@ func (pool *LegacyPool) Clear() {
|
|||
// acquire the subpool lock until the transaction addition is completed.
|
||||
|
||||
for addr := range pool.pending {
|
||||
if _, ok := pool.queue[addr]; !ok {
|
||||
pool.reserver.Release(addr)
|
||||
}
|
||||
}
|
||||
for addr := range pool.queue {
|
||||
pool.reserver.Release(addr)
|
||||
}
|
||||
pool.all = newLookup()
|
||||
|
|
|
|||
Loading…
Reference in a new issue