Skip to content

Commit 8149439

Browse files
cskiralyrjl493456442
authored andcommitted
core/txpool/legacypool: reset gauges on clear (ethereum#33654)
Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com> Co-authored-by: rjl493456442 <garyrong0905@gmail.com>
1 parent 8a9faeb commit 8149439

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

core/txpool/legacypool/legacypool.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1846,6 +1846,10 @@ func (pool *LegacyPool) Clear() {
18461846
pool.queue = newQueue(pool.config, pool.signer)
18471847
pool.pendingNonces = newNoncer(pool.currentState)
18481848

1849+
// Reset gauges
1850+
pendingGauge.Update(0)
1851+
queuedGauge.Update(0)
1852+
slotsGauge.Update(0)
18491853
pendingAddrsGauge.Update(0)
18501854
queuedAddrsGauge.Update(0)
18511855
}

0 commit comments

Comments
 (0)