diff --git a/crates/primitives-traits/src/block/recovered.rs b/crates/primitives-traits/src/block/recovered.rs index fd2acea1d00..be105344644 100644 --- a/crates/primitives-traits/src/block/recovered.rs +++ b/crates/primitives-traits/src/block/recovered.rs @@ -616,6 +616,12 @@ impl<'a, B: Block> IndexedTx<'a, B> { self.tx } + /// Returns the recovered transaction with the sender. + pub fn recovered_tx(&self) -> Recovered<&::Transaction> { + let sender = self.block.senders[self.index]; + Recovered::new_unchecked(self.tx, sender) + } + /// Returns the transaction hash. pub fn tx_hash(&self) -> TxHash { self.tx.trie_hash()