Function zebra_consensus::block::check::merkle_root_validity

source ·
pub fn merkle_root_validity(
    network: &Network,
    block: &Block,
    transaction_hashes: &[Hash],
) -> Result<(), BlockError>
Expand description

Check Merkle root validity.

transaction_hashes is a precomputed list of transaction hashes.

§Consensus rules:

  • A SHA-256d hash in internal byte order. The merkle root is derived from the hashes of all transactions included in this block, ensuring that none of those transactions can be modified without modifying the header. 7.6

§Panics

  • If block does not have a coinbase transaction.