Skip to content

Commit

Permalink
Merge pull request #214 from 0xPolygonMiden/hacka-mmr-peaks-into-parts
Browse files Browse the repository at this point in the history
mmr: add into_parts for the peaks
  • Loading branch information
hackaugusto authored Nov 3, 2023
2 parents 84a26b6 + e4c3367 commit b677952
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/merkle/mmr/peaks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,11 @@ impl MmrPeaks {
&self.peaks
}

/// Returns the current num_leaves and peaks of the [Mmr].
pub fn into_parts(self) -> (usize, Vec<RpoDigest>) {
(self.num_leaves, self.peaks)
}

/// Hashes the peaks.
///
/// The procedure will:
Expand Down

0 comments on commit b677952

Please sign in to comment.