cuprate_blockchain::ops::block

Function get_block_extended_header

Source
pub fn get_block_extended_header(
    block_hash: &BlockHash,
    tables: &impl Tables,
) -> Result<ExtendedBlockHeader, RuntimeError>
Expand description

Retrieve a ExtendedBlockHeader from the database.

This extracts all the data from the database tables needed to create a full ExtendedBlockHeader.

§Notes

This is slightly more expensive than get_block_extended_header_from_height (1 more database lookup).

§Errors

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