Skip to main content

check_body_matches_header

Function check_body_matches_header 

Source
fn check_body_matches_header(
    block: &Block,
    hash: Hash,
    advertiser_addr: Option<PeerSocketAddr>,
) -> Result<(), BlockDownloadVerifyError>
Expand description

Returns a BlockDownloadVerifyError::BodyHeaderMismatch if block’s transactions don’t match its header, so its coinbase height can’t be trusted.

Only call this before using a block’s height without verifying the block, because the block verifiers compute the same Merkle root. See zebra_consensus::body_matches_header().