reth_rpc_types_compat::block

Function from_block

Source
pub fn from_block<T, B>(
    block: BlockWithSenders<B>,
    kind: BlockTransactionsKind,
    block_hash: Option<B256>,
    tx_resp_builder: &T,
) -> Result<Block<T::Transaction, Header<B::Header>>, T::Error>
where T: TransactionCompat<<<B as BlockTrait>::Body as BlockBody>::Transaction>, B: BlockTrait,
Expand description

Converts the given primitive block into a [Block] response with the given [BlockTransactionsKind]

If a block_hash is provided, then this is used, otherwise the block hash is computed.