From 9a8e14e77eb1b81297438211d8f946038888345f Mon Sep 17 00:00:00 2001 From: Csaba Kiraly Date: Fri, 23 Jan 2026 13:35:14 +0100 Subject: [PATCH] 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 --- core/txpool/legacypool/legacypool.go | 1 + 1 file changed, 1 insertion(+) diff --git a/core/txpool/legacypool/legacypool.go b/core/txpool/legacypool/legacypool.go index eb1fe23d5f..1bfc6e60b2 100644 --- a/core/txpool/legacypool/legacypool.go +++ b/core/txpool/legacypool/legacypool.go @@ -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