Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions crates/primitives-traits/src/block/recovered.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<&<B::Body as BlockBody>::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()
Expand Down