arnaucube
arnaucube/miden-cryptoPublic Self-hosted repository
mmr: add into_parts for the peaks
Augusto F. Hack hack.augusto@gmail.com
Thu, 02 Nov 2023 19:56:52 +0100
commit

800994c69b89088c2e6b71888396d6b6205eedcf

parent

26560605bfba860859f7749bc62661eed8ce78fa

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: