diff --git a/crates/primitives-traits/src/block/recovered.rs b/crates/primitives-traits/src/block/recovered.rs index 0828646cf1f6..9ae2b5f0a631 100644 --- a/crates/primitives-traits/src/block/recovered.rs +++ b/crates/primitives-traits/src/block/recovered.rs @@ -291,9 +291,17 @@ impl RecoveredBlock { self.senders.iter().zip(self.block.body().transactions()) } - /// Returns an iterator over all transactions in the block. + /// Returns an iterator over `Recovered<&Transaction>` #[inline] - pub fn into_transactions_ecrecovered( + pub fn transactions_recovered( + &self, + ) -> impl Iterator::Transaction>> { + self.transactions_with_sender().map(|(sender, tx)| Recovered::new_unchecked(tx, *sender)) + } + + /// Consumes the type and returns an iterator over all [`Recovered`] transactions in the block. + #[inline] + pub fn into_transactions_recovered( self, ) -> impl Iterator::Transaction>> { self.block diff --git a/crates/rpc/rpc/src/debug.rs b/crates/rpc/rpc/src/debug.rs index 59637ce81b0e..03d3be8171e1 100644 --- a/crates/rpc/rpc/src/debug.rs +++ b/crates/rpc/rpc/src/debug.rs @@ -872,7 +872,7 @@ where .block_with_senders_by_id(block_id, TransactionVariant::NoHash) .to_rpc_result()? .unwrap_or_default(); - Ok(block.into_transactions_ecrecovered().map(|tx| tx.encoded_2718().into()).collect()) + Ok(block.into_transactions_recovered().map(|tx| tx.encoded_2718().into()).collect()) } /// Handler for `debug_getRawReceipts`