diff --git a/crates/primitives-traits/src/block/recovered.rs b/crates/primitives-traits/src/block/recovered.rs index bf232a7d17..fbba626c40 100644 --- a/crates/primitives-traits/src/block/recovered.rs +++ b/crates/primitives-traits/src/block/recovered.rs @@ -291,6 +291,15 @@ impl RecoveredBlock { self.senders.iter().zip(self.block.body().transactions()) } + /// Returns an iterator over cloned `Recovered` + #[inline] + pub fn clone_transactions_recovered( + &self, + ) -> impl Iterator::Transaction>> + '_ { + self.transactions_with_sender() + .map(|(sender, tx)| Recovered::new_unchecked(tx.clone(), *sender)) + } + /// Returns an iterator over `Recovered<&Transaction>` #[inline] pub fn transactions_recovered(