core/txpool/legacypool: fix stale counter #33653 (#1990)

This commit is contained in:
Daniel Liu 2026-01-29 13:55:55 +08:00 committed by GitHub
parent 7fd5927081
commit 84aedaa7bf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1856,7 +1856,6 @@ func (pool *LegacyPool) demoteUnexecutables() {
pool.all.Remove(hash)
log.Trace("Removed unpayable pending transaction", "hash", hash)
}
pool.priced.Removed(len(olds) + len(drops))
pendingNofundsMeter.Mark(int64(len(drops)))
for _, tx := range invalids {
@ -1866,6 +1865,7 @@ func (pool *LegacyPool) demoteUnexecutables() {
// Internal shuffle shouldn't touch the lookup set.
pool.enqueueTx(hash, tx, false, false)
}
pool.priced.Removed(len(olds) + len(drops))
pendingGauge.Dec(int64(len(olds) + len(drops) + len(invalids)))
if pool.locals.contains(addr) {
localGauge.Dec(int64(len(olds) + len(drops) + len(invalids)))