// Reconstruct the current MMR from the next checkpoint after the base MMR to the last checkpoints.
Reconstruct the current MMR from the next checkpoint after the base MMR to the last checkpoints.
Reconstruct the current MMR from the next checkpoint after the base MMR to the last checkpoints .
fn create_curr_mmr(&mut self) -> Result<(), MerkleMountainRangeError> {
        self.curr_cp_index = self
            .checkpoints
            .len()
            .map_err(|e| MerkleMountainRangeError::BackendError(e.to_string()))?;
        self.curr_mmr = prune_mutable_mmr::<D, _>(&self.base_mmr)?;
        for cp_index in self.base_cp_index + 1..self.curr_cp_index {
            if let Some(cp) = self
                .checkpoints
                .get(cp_index)
                .map_err(|e| MerkleMountainRangeError::BackendError(e.to_string()))?
            {
                cp.apply(&mut self.curr_mmr)?;
            }
        }
        Ok(())
    }
fn create_curr_mmr ( & mut self ) -> Result < ( ) , MerkleMountainRangeError > { self . curr_cp_index = self . checkpoints . len ( ) . map_err ( | e | MerkleMountainRangeError :: BackendError ( e . to_string ( ) ) ) ? ; self . curr_mmr = prune_mutable_mmr :: < D , _ > ( & self . base_mmr ) ? ; for cp_index in self . base_cp_index + 1 .. self . curr_cp_index { if let Some ( cp ) = self . checkpoints . get ( cp_index ) . map_err ( | e | MerkleMountainRangeError :: BackendError ( e . to_string ( ) ) ) ? { cp . apply ( & mut self . curr_mmr ) ? ; } } Ok ( ( ) ) }
Reconstruct the current MMR from the next checkpoint after the base MMR to the last checkpoints.
Reconstruct the current MMR from the next checkpoint after the base MMR to the last checkpoints .
&mut self