reth_node_core::rpc::compat::engine::payload

Function validate_block_hash

pub fn validate_block_hash(
    expected_block_hash: FixedBytes<32>,
    block: Block,
) -> Result<SealedBlock, PayloadError>
Expand description

Takes the expected block hash and Block, validating the block and converting it into a SealedBlock.

If the provided block hash does not match the block hash computed from the provided block, this returns [PayloadError::BlockHash].