mmr: add into_parts for the peaks
Augusto F. Hack hack.augusto@gmail.com
Thu, 02 Nov 2023 19:56:52 +0100
1 files changed,
5 insertions(+),
0 deletions(-)
jump to
M
src/merkle/mmr/peaks.rs
→
src/merkle/mmr/peaks.rs
@@ -54,6 +54,11 @@ pub fn peaks(&self) -> &[RpoDigest] {
&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: