mmr: add into_parts for the peaks

This commit is contained in:
Augusto F. Hack 2023-11-02 19:56:52 +01:00 committed by Bobbin Threadbare
parent 1f92d5417a
commit 9f95582654

View file

@ -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: