Function cuprate_blockchain::ops::block::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.