fn fetch_pruning_horizon(env: &Environment, db: &Database) -> Result<u64, ChainStorageError> {
    let k = MetadataKey::PruningHorizon;
    let val: Option<MetadataValue> = lmdb_get(&env, &db, &(k as u32))?;
    match val {
        Some(MetadataValue::PruningHorizon(pruning_horizon)) => Ok(pruning_horizon),
        _ => Ok(0),
    }
}
// Fetches the pruning horizon from the provided metadata db.
Fetches the pruning horizon from the provided metadata db.
Fetches the pruning horizon from the provided metadata db .
fn fetch_pruning_horizon(env: &Environment, db: &Database) -> Result<u64, ChainStorageError> {
    let k = MetadataKey::PruningHorizon;
    let val: Option<MetadataValue> = lmdb_get(&env, &db, &(k as u32))?;
    match val {
        Some(MetadataValue::PruningHorizon(pruning_horizon)) => Ok(pruning_horizon),
        _ => Ok(0),
    }
}
fn fetch_pruning_horizon ( env : & Environment , db : & Database ) -> Result < u64 , ChainStorageError > { let k = MetadataKey :: PruningHorizon ; let val : Option < MetadataValue > = lmdb_get ( & env , & db , & ( k as u32 ) ) ? ; match val { Some ( MetadataValue :: PruningHorizon ( pruning_horizon ) ) => Ok ( pruning_horizon ) , _ => Ok ( 0 ) , } }
Fetches the pruning horizon from the provided metadata db.
Fetches the pruning horizon from the provided metadata db .
env
&Environment
db
&Database
env
&Environment
db
&Database