reth::core::rpc::compat::block

Function from_block

pub fn from_block<T>(
    block: BlockWithSenders,
    total_difficulty: Uint<256, 4>,
    kind: BlockTransactionsKind,
    block_hash: Option<FixedBytes<32>>,
    tx_resp_builder: &T,
) -> Result<Block<<T as TransactionCompat>::Transaction>, <T as TransactionCompat>::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.