fn fetch_checkpoint_at_height(&self, tree: MmrTree, height: u64) -> Result<MerkleCheckPoint, ChainStorageError> {
        let tip_height = lmdb_len(&self.env, &self.headers_db)? as u64;
        let pruned_mode = self.mem_metadata.is_pruned_node();
        match tree {
            MmrTree::Kernel => {
                checkpoint_utils::fetch_checkpoint(&self.kernel_checkpoints, pruned_mode, tip_height, height)
            },
            MmrTree::Utxo => {
                checkpoint_utils::fetch_checkpoint(&self.utxo_checkpoints, pruned_mode, tip_height, height)
            },
            MmrTree::RangeProof => {
                checkpoint_utils::fetch_checkpoint(&self.range_proof_checkpoints, pruned_mode, tip_height, height)
            },
        }
        .map_err(|e| ChainStorageError::AccessError(format!("Checkpoint error: {}", e.to_string())))?
        .ok_or_else(|| ChainStorageError::OutOfRange)
    }
// Retrieves the checkpoint corresponding to the provided height, if the checkpoint is part of the horizon state
// then a BeyondPruningHorizon error will be produced.
Retrieves the checkpoint corresponding to the provided height, if the checkpoint is part of the horizon state
then a BeyondPruningHorizon error will be produced.
Retrieves the checkpoint corresponding to the provided height if the checkpoint is part of the horizon state then a BeyondPruningHorizon error will be produced .
fn fetch_checkpoint_at_height(&self, tree: MmrTree, height: u64) -> Result<MerkleCheckPoint, ChainStorageError> {
        let tip_height = lmdb_len(&self.env, &self.headers_db)? as u64;
        let pruned_mode = self.mem_metadata.is_pruned_node();
        match tree {
            MmrTree::Kernel => {
                checkpoint_utils::fetch_checkpoint(&self.kernel_checkpoints, pruned_mode, tip_height, height)
            },
            MmrTree::Utxo => {
                checkpoint_utils::fetch_checkpoint(&self.utxo_checkpoints, pruned_mode, tip_height, height)
            },
            MmrTree::RangeProof => {
                checkpoint_utils::fetch_checkpoint(&self.range_proof_checkpoints, pruned_mode, tip_height, height)
            },
        }
        .map_err(|e| ChainStorageError::AccessError(format!("Checkpoint error: {}", e.to_string())))?
        .ok_or_else(|| ChainStorageError::OutOfRange)
    }
fn fetch_checkpoint_at_height ( & self , tree : MmrTree , height : u64 ) -> Result < MerkleCheckPoint , ChainStorageError > { let tip_height = lmdb_len ( & self . env , & self . headers_db ) ? as u64 ; let pruned_mode = self . mem_metadata . is_pruned_node ( ) ; match tree { MmrTree :: Kernel => { checkpoint_utils :: fetch_checkpoint ( & self . kernel_checkpoints , pruned_mode , tip_height , height ) } , MmrTree :: Utxo => { checkpoint_utils :: fetch_checkpoint ( & self . utxo_checkpoints , pruned_mode , tip_height , height ) } , MmrTree :: RangeProof => { checkpoint_utils :: fetch_checkpoint ( & self . range_proof_checkpoints , pruned_mode , tip_height , height ) } , } . map_err ( | e | ChainStorageError :: AccessError ( format ! ( " " e to_string ( ) ) ) ) ? . ok_or_else ( | | ChainStorageError :: OutOfRange ) }
Retrieves the checkpoint corresponding to the provided height, if the checkpoint is part of the horizon state
then a BeyondPruningHorizon error will be produced.
Retrieves the checkpoint corresponding to the provided height if the checkpoint is part of the horizon state then a BeyondPruningHorizon error will be produced .
&self
tree
MmrTree
height
u64
&self
tree
MmrTree
height
u64