Skip to content

Commit

Permalink
Transaction pool status report rate 60secs
Browse files Browse the repository at this point in the history
  • Loading branch information
gameofpointers committed Apr 17, 2023
1 parent 9b24d60 commit 1b410cb
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions core/tx_pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ var (

var (
evictionInterval = time.Minute // Time interval to check for evictable transactions
statsReportInterval = 8 * time.Second // Time interval to report transaction pool stats
statsReportInterval = 1 * time.Minute // Time interval to report transaction pool stats
)

var (
Expand Down Expand Up @@ -326,7 +326,6 @@ func (pool *TxPool) loop() {
defer pool.wg.Done()

var (
prevPending, prevQueued, prevStales int
// Start the stats reporting and transaction eviction tickers
report = time.NewTicker(statsReportInterval)
evict = time.NewTicker(evictionInterval)
Expand Down Expand Up @@ -359,11 +358,7 @@ func (pool *TxPool) loop() {
stales := pool.priced.stales
pool.mu.RUnlock()

if pending != prevPending || queued != prevQueued || stales != prevStales {
log.Debug("Transaction pool status report", "executable", pending, "queued", queued, "stales", stales)
prevPending, prevQueued, prevStales = pending, queued, stales
}

log.Info("Transaction pool status report", "executable", pending, "queued", queued, "stales", stales)
// Handle inactive account transaction eviction
case <-evict.C:
pool.mu.Lock()
Expand Down

0 comments on commit 1b410cb

Please sign in to comment.