Skip to content

Commit

Permalink
mmr: add into_parts for the peaks
Browse files Browse the repository at this point in the history
  • Loading branch information
hackaugusto committed Nov 2, 2023
1 parent 9a24daa commit b5a0e25
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 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 b5a0e25

Please sign in to comment.