Skip to content

Commit

Permalink
chore: add missing debugs for pool types (#12546)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattsse authored Nov 14, 2024
1 parent 77e687c commit c5d1b81
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions crates/transaction-pool/src/pool/best.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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.
Expand Down
6 changes: 4 additions & 2 deletions crates/transaction-pool/src/validate/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
}
Expand Down

0 comments on commit c5d1b81

Please sign in to comment.