chore: add additional traces for promoted txs (#10093)

This commit is contained in:
Matthias Seitz
2024-08-05 20:34:20 +02:00
committed by GitHub
parent b9ff65511d
commit f8e6e2e3d4
2 changed files with 3 additions and 0 deletions

View File

@@ -599,6 +599,8 @@ where
/// Notifies transaction listeners about changes once a block was processed.
fn notify_on_new_state(&self, outcome: OnNewCanonicalStateOutcome<T::Transaction>) {
trace!(target: "txpool", promoted=outcome.promoted.len(), discarded= outcome.discarded.len() ,"notifying listeners on state change");
// notify about promoted pending transactions
// emit hashes
self.pending_transaction_listener

View File

@@ -582,6 +582,7 @@ impl<T: TransactionOrdering> TxPool<T> {
let moved = self.move_transaction(current, move_to, &id);
if matches!(move_to, SubPool::Pending) {
if let Some(tx) = moved {
trace!(target: "txpool", hash=%tx.transaction.hash(), "Promoted transaction to pending");
outcome.promoted.push(tx);
}
}