mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-01-29 17:18:08 -05:00
feat: add performed pool state updates metric (#3714)
This commit is contained in:
@@ -33,6 +33,9 @@ pub struct TxPoolMetrics {
|
||||
|
||||
/// Number of all transactions of all sub-pools: pending + basefee + queued
|
||||
pub(crate) total_transactions: Gauge,
|
||||
|
||||
/// How often the pool was updated after the canonical state changed
|
||||
pub(crate) performed_state_updates: Counter,
|
||||
}
|
||||
|
||||
/// Transaction pool maintenance metrics
|
||||
|
||||
@@ -261,6 +261,8 @@ impl<T: TransactionOrdering> TxPool<T> {
|
||||
// update the metrics after the update
|
||||
self.update_size_metrics();
|
||||
|
||||
self.metrics.performed_state_updates.increment(1);
|
||||
|
||||
OnNewCanonicalStateOutcome { block_hash, mined: mined_transactions, promoted, discarded }
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user