pub fn validate_block_pre_execution_with_tx_root<B, ChainSpec>(
block: &SealedBlock<B>,
chain_spec: &ChainSpec,
transaction_root: Option<FixedBytes<32>>,
) -> Result<(), ConsensusError>Available on crate feature
consensus only.Expand description
Validate a block without regard for state using an optional pre-computed transaction root.
- Compares the ommer hash in the block header to the block body
- Compares the transactions root in the block header to the block body
- Pre-execution transaction validation
If transaction_root is provided, it is used instead of recomputing the transaction trie
root from the block body. The caller must ensure this value was derived from
block.body().calculate_tx_root().