mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-02-26 07:37:20 +00:00
core/txpool/legacypool: fix stale counter (#33653)
Calling `pool.priced.Removed` is needed to keep is sync with `pool.all.Remove`. It was called in other occurances, but not here. The counter is used for internal heap management. It was working even without this, just not calling reheap at the intended frequency. Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
This commit is contained in:
parent
251b863107
commit
9a8e14e77e
1 changed files with 1 additions and 0 deletions
|
|
@ -1568,6 +1568,7 @@ func (pool *LegacyPool) demoteUnexecutables() {
|
|||
// Internal shuffle shouldn't touch the lookup set.
|
||||
pool.enqueueTx(hash, tx, false)
|
||||
}
|
||||
pool.priced.Removed(len(olds) + len(drops))
|
||||
pendingGauge.Dec(int64(len(olds) + len(drops) + len(invalids)))
|
||||
|
||||
// If there's a gap in front, alert (should never happen) and postpone all transactions
|
||||
|
|
|
|||
Loading…
Reference in a new issue