core/txpool/legacypool: fix stale counter (#33653)
Some checks failed
/ Linux Build (push) Has been cancelled
/ Linux Build (arm) (push) Has been cancelled
/ Keeper Build (push) Has been cancelled
/ Windows Build (push) Has been cancelled
/ Docker Image (push) Has been cancelled

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:
Csaba Kiraly 2026-01-23 13:35:14 +01:00 committed by GitHub
parent 251b863107
commit 9a8e14e77e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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