fn fetch_chain_height(env: &Environment, db: &Database) -> Result<Option<u64>, ChainStorageError> {
    let k = MetadataKey::ChainHeight;
    let val: Option<MetadataValue> = lmdb_get(&env, &db, &(k as u32))?;
    match val {
        Some(MetadataValue::ChainHeight(height)) => Ok(height),
        _ => Ok(None),
    }
}
// Fetches the chain height from the provided metadata db.
Fetches the chain height from the provided metadata db.
Fetches the chain height from the provided metadata db .
fn fetch_chain_height(env: &Environment, db: &Database) -> Result<Option<u64>, ChainStorageError> {
    let k = MetadataKey::ChainHeight;
    let val: Option<MetadataValue> = lmdb_get(&env, &db, &(k as u32))?;
    match val {
        Some(MetadataValue::ChainHeight(height)) => Ok(height),
        _ => Ok(None),
    }
}
fn fetch_chain_height ( env : & Environment , db : & Database ) -> Result < Option < u64 > , ChainStorageError > { let k = MetadataKey :: ChainHeight ; let val : Option < MetadataValue > = lmdb_get ( & env , & db , & ( k as u32 ) ) ? ; match val { Some ( MetadataValue :: ChainHeight ( height ) ) => Ok ( height ) , _ => Ok ( None ) , } }
Fetches the chain height from the provided metadata db.
Fetches the chain height from the provided metadata db .
env
&Environment
db
&Database
env
&Environment
db
&Database