Function cuprate_blockchain::ops::alt_block::get_alt_block_hash

source ·
pub fn get_alt_block_hash(
    block_height: &BlockHeight,
    alt_chain: ChainId,
    tables: &impl Tables,
) -> Result<BlockHash, RuntimeError>
Expand description

Retrieves the hash of the block at the given block_height on the alt chain with the given ChainId.

This function will get blocks from the whole chain, for example if you were to ask for height 0 with any ChainId (as long that chain actually exists) you will get the main chain genesis.

§Errors

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