From d2285e645d69ba17c9864d08a33086b59434f191 Mon Sep 17 00:00:00 2001 From: stevencartavia Date: Sat, 13 Sep 2025 02:35:19 -0600 Subject: [PATCH] feat: fn recovered_tx to indexedTx --- crates/primitives-traits/src/block/recovered.rs | 6 ++++++ 1 file changed, 6 insertions(+) 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()