/// Inform the MmrCache that the first N checkpoints have been merged to allow the base and current indices to be
/// updated.
Inform the MmrCache that the first N checkpoints have been merged to allow the base and current indices to be
updated.
Inform the MmrCache that the first N checkpoints have been merged to allow the base and current indices to be updated .
pub fn checkpoints_merged(&mut self, num_merged: usize) -> Result<(), MerkleMountainRangeError> {
        if let Some(num_reverse) = num_merged.checked_sub(1) {
            self.base_cp_index = self.base_cp_index.saturating_sub(num_reverse);
            self.curr_cp_index = self.curr_cp_index.saturating_sub(num_reverse);
        }
        self.update()
    }
pub fn checkpoints_merged ( & mut self , num_merged : usize ) -> Result < ( ) , MerkleMountainRangeError > { if let Some ( num_reverse ) = num_merged . checked_sub ( 1 ) { self . base_cp_index = self . base_cp_index . saturating_sub ( num_reverse ) ; self . curr_cp_index = self . curr_cp_index . saturating_sub ( num_reverse ) ; } self . update ( ) }
Inform the MmrCache that the first N checkpoints have been merged to allow the base and current indices to be
updated.
Inform the MmrCache that the first N checkpoints have been merged to allow the base and current indices to be updated .
&mut self
num_merged
usize