Skip to content

Commit

Permalink
add logs to tx_pool 4
Browse files Browse the repository at this point in the history
  • Loading branch information
0xmountaintop committed Oct 20, 2024
1 parent ce086a1 commit 0ebd13d
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions core/tx_pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -1541,17 +1541,17 @@ func (pool *TxPool) promoteExecutables(accounts []common.Address) []*types.Trans

// Drop all transactions over the allowed limit
var caps types.Transactions
if !pool.locals.contains(addr) {
caps = list.Cap(int(pool.config.AccountQueue))
for _, tx := range caps {
hash := tx.Hash()
log.Error("Drop all transactions over the allowed limit", "hash", hash)
pool.all.Remove(hash)
pool.calculateTxsLifecycle(types.Transactions{tx}, time.Now())
log.Trace("Removed cap-exceeding queued transaction", "hash", hash)
}
queuedRateLimitMeter.Mark(int64(len(caps)))
}
// if !pool.locals.contains(addr) {
// caps = list.Cap(int(pool.config.AccountQueue))
// for _, tx := range caps {
// hash := tx.Hash()
// log.Error("Drop all transactions over the allowed limit", "hash", hash)
// pool.all.Remove(hash)
// pool.calculateTxsLifecycle(types.Transactions{tx}, time.Now())
// log.Trace("Removed cap-exceeding queued transaction", "hash", hash)
// }
// queuedRateLimitMeter.Mark(int64(len(caps)))
// }
// Mark all the items dropped as removed
pool.priced.Removed(len(forwards) + len(drops) + len(caps))
queuedGauge.Dec(int64(len(forwards) + len(drops) + len(caps)))
Expand Down

0 comments on commit 0ebd13d

Please sign in to comment.