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

9f955826548f03036e1ff4dfc4f3808dca482c9f

parent

1f92d5417a9fb9160dc93e3183c4e7bb68c32e55

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: