Function cuprate_blockchain::ops::alt_block::get_alt_block

source ·
pub fn get_alt_block(
    alt_block_height: &AltBlockHeight,
    tables: &impl Tables,
) -> Result<AltBlockInformation, RuntimeError>
Expand description

Retrieves an AltBlockInformation from the database.

This function will look at only the blocks with the given AltBlockHeight::chain_id, no others even if they are technically part of this chain.

§Errors

This function returns RuntimeError::KeyNotFound if the input (if applicable) doesn’t exist or other RuntimeError’s on database errors.