Skip to main content

block_and_size

Function block_and_size 

Source
pub fn block_and_size<C>(
    chain: Option<C>,
    db: &ZebraDb,
    hash_or_height: HashOrHeight,
) -> Result<Option<(Arc<Block>, usize)>, BlockReadError>
where C: AsRef<Chain>,
Expand description

Returns the Block with block::Hash or Height, if it exists in the non-finalized chain or finalized db.

Returns an error if primary data is incomplete. An incomplete secondary view returns None.