Skip to main content

verify_block

Function verify_block 

Source
pub fn verify_block(
    table: &mut TransferTable,
    manifest_digest: StrongDigest,
    block_index: u8,
    generation: Generation,
    payload: &[u8],
) -> Result<(), QdnfError>
Expand description

Verify payload against the admitted slot. Uses the admit charge.

Never admitted → QdnfError::Incomplete. Empty payload with len > 0 → QdnfError::Malformed. Length mismatch → QdnfError::Range. sha384(payload) must equal the per-block digest stored at admit, or the manifest digest when no per-block digest was stored; mismatch → QdnfError::Conflict and verified stays false. verified is set only after a matching hash.