core/txpool/legacypool: set gauges to 0 on clear

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

View file

@ -1845,6 +1845,9 @@ func (pool *LegacyPool) Clear() {
pool.pending = make(map[common.Address]*list) pool.pending = make(map[common.Address]*list)
pool.queue = newQueue(pool.config, pool.signer) pool.queue = newQueue(pool.config, pool.signer)
pool.pendingNonces = newNoncer(pool.currentState) pool.pendingNonces = newNoncer(pool.currentState)
pendingAddrsGauge.Update(0)
queuedAddrsGauge.Update(0)
} }
// HasPendingAuth returns a flag indicating whether there are pending // HasPendingAuth returns a flag indicating whether there are pending