reth::primitives

Trait BlockBodyTxExt

pub trait BlockBodyTxExt: BlockBody {
    // Provided methods
    fn calculate_tx_root(&self) -> FixedBytes<32>
       where Self::Transaction: Encodable2718 { ... }
    fn recover_signers(&self) -> Option<Vec<Address>>
       where Self::Transaction: SignedTransaction { ... }
    fn recover_signers_unchecked(&self) -> Option<Vec<Address>>
       where Self::Transaction: SignedTransaction { ... }
}
Expand description

Extension trait for BlockBody adding helper methods operating with transactions.

Provided Methods§

fn calculate_tx_root(&self) -> FixedBytes<32>
where Self::Transaction: Encodable2718,

Calculate the transaction root for the block body.

fn recover_signers(&self) -> Option<Vec<Address>>
where Self::Transaction: SignedTransaction,

Recover signer addresses for all transactions in the block body.

fn recover_signers_unchecked(&self) -> Option<Vec<Address>>
where Self::Transaction: SignedTransaction,

Recover signer addresses for all transactions in the block body without ensuring that the signature has a low s value.

Returns None, if some transaction’s signature is invalid, see also recover_signers_unchecked.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

§

impl<T> BlockBodyTxExt for T
where T: BlockBody,