chore: add missing debugs for pool types (#12546)

This commit is contained in:
Matthias Seitz
2024-11-14 17:03:28 +01:00
committed by GitHub
parent 77e687c28c
commit c5d1b813e4
2 changed files with 6 additions and 2 deletions

View File

@ -20,6 +20,7 @@ use tracing::debug;
/// This is a wrapper around [`BestTransactions`] that also enforces a specific basefee.
///
/// This iterator guarantees that all transaction it returns satisfy both the base fee and blob fee!
#[derive(Debug)]
pub(crate) struct BestTransactionsWithFees<T: TransactionOrdering> {
pub(crate) best: BestTransactions<T>,
pub(crate) base_fee: u64,
@ -72,6 +73,7 @@ impl<T: TransactionOrdering> Iterator for BestTransactionsWithFees<T> {
/// be executed on the current state, but only yields transactions that are ready to be executed
/// now. While it contains all gapless transactions of a sender, it _always_ only returns the
/// transaction with the current on chain nonce.
#[derive(Debug)]
pub(crate) struct BestTransactions<T: TransactionOrdering> {
/// Contains a copy of _all_ transactions of the pending pool at the point in time this
/// iterator was created.

View File

@ -453,9 +453,11 @@ impl<T: PoolTransaction> Clone for ValidPoolTransaction<T> {
impl<T: PoolTransaction> fmt::Debug for ValidPoolTransaction<T> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.debug_struct("ValidPoolTransaction")
.field("id", &self.transaction_id)
.field("pragate", &self.propagate)
.field("origin", &self.origin)
.field("hash", self.transaction.hash())
.field("provides", &self.transaction_id)
.field("raw_tx", &self.transaction)
.field("tx", &self.transaction)
.finish()
}
}