Function reth::rpc::compat::engine::try_into_sealed_block

pub fn try_into_sealed_block(
    payload: ExecutionPayload,
    parent_beacon_block_root: Option<FixedBytes<32>>,
) -> Result<SealedBlock, PayloadError>
Expand description

Tries to create a new block from the given payload and optional parent beacon block root.

NOTE: Empty ommers, nonce and difficulty values are validated upon computing block hash and comparing the value with payload.block_hash.

Uses try_into_block to convert from the ExecutionPayload to Block and seals the block with its hash.

Uses validate_block_hash to validate the payload block hash and ultimately return the SealedBlock.