reth_rpc_types_compat::block

Function from_block

Source
pub fn from_block<T: TransactionCompat>(
    block: BlockWithSenders,
    total_difficulty: U256,
    kind: BlockTransactionsKind,
    block_hash: Option<B256>,
    tx_resp_builder: &T,
) -> Result<Block<T::Transaction>, T::Error>
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.