Skip to main content

admit_block

Function admit_block 

Source
pub fn admit_block(
    table: &mut TransferTable,
    ledger: &mut ReservationLedger,
    manifest_digest: StrongDigest,
    block_index: u8,
    len: u32,
    generation: Generation,
) -> Result<(), QdnfError>
Expand description

Admit one bounded block. One ledger charge covers receive+store+verify.

QdnfError::Malformed if manifest_digest is StrongDigest::ZERO. QdnfError::Range if len is 0 or > MAX_BLOCK_BYTES, or block_index is not in 0..MAX_BLOCKS. QdnfError::Capacity at eight occupied slots. QdnfError::BudgetExhausted leaves the table unchanged.