From 3503444342f1ba41cde5605f4d1e8224facbdceb Mon Sep 17 00:00:00 2001 From: Roman Krasiuk Date: Mon, 6 Mar 2023 21:55:41 +0200 Subject: [PATCH] chore(txpool): expose underlying tx (#1651) --- crates/transaction-pool/src/traits.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/crates/transaction-pool/src/traits.rs b/crates/transaction-pool/src/traits.rs index 1d33567c66..300699e861 100644 --- a/crates/transaction-pool/src/traits.rs +++ b/crates/transaction-pool/src/traits.rs @@ -313,6 +313,13 @@ pub struct PooledTransaction { pub(crate) effective_gas_price: u128, } +impl PooledTransaction { + /// Return the reference to the underlying transaction. + pub fn transaction(&self) -> &TransactionSignedEcRecovered { + &self.transaction + } +} + impl PoolTransaction for PooledTransaction { /// Returns hash of the transaction. fn hash(&self) -> &TxHash {