core/txpool/legacypool: reset gauges on clear

Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
This commit is contained in:
Csaba Kiraly 2026-01-20 21:52:25 +01:00
parent d0af257aa2
commit c0526ea726
No known key found for this signature in database
GPG key ID: 0FE274EE8C95166E

View file

@ -1839,6 +1839,11 @@ func (pool *LegacyPool) Clear() {
pool.pending = make(map[common.Address]*list)
pool.queue = newQueue(pool.config, pool.signer)
pool.pendingNonces = newNoncer(pool.currentState)
// Reset gauges
pendingGauge.Update(0)
queuedGauge.Update(0)
slotsGauge.Update(0)
}
// HasPendingAuth returns a flag indicating whether there are pending