diff --git a/crates/transaction-pool/src/pool/txpool.rs b/crates/transaction-pool/src/pool/txpool.rs index c43868d36e49..a90aa35717a6 100644 --- a/crates/transaction-pool/src/pool/txpool.rs +++ b/crates/transaction-pool/src/pool/txpool.rs @@ -546,9 +546,10 @@ impl TxPool { // Update invalid transactions metric self.metrics.invalid_transactions.increment(1); match err { - InsertErr::Underpriced { existing, transaction: _ } => { - Err(PoolError::new(existing, PoolErrorKind::ReplacementUnderpriced)) - } + InsertErr::Underpriced { existing: _, transaction } => Err(PoolError::new( + *transaction.hash(), + PoolErrorKind::ReplacementUnderpriced, + )), InsertErr::FeeCapBelowMinimumProtocolFeeCap { transaction, fee_cap } => { Err(PoolError::new( *transaction.hash(), @@ -1725,8 +1726,8 @@ pub(crate) type InsertResult = Result, InsertErr>; pub(crate) enum InsertErr { /// Attempted to replace existing transaction, but was underpriced Underpriced { - #[allow(dead_code)] transaction: Arc>, + #[allow(dead_code)] existing: TxHash, }, /// Attempted to insert a blob transaction with a nonce gap