mirror of
https://github.com/arnaucube/miden-crypto.git
synced 2026-01-12 00:51:29 +01:00
feat: add merkle store
This commit is contained in:
@@ -9,7 +9,7 @@ use winter_math::log2;
|
||||
/// A fully-balanced binary Merkle tree (i.e., a tree where the number of leaves is a power of two).
|
||||
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||
pub struct MerkleTree {
|
||||
nodes: Vec<Word>,
|
||||
pub(crate) nodes: Vec<Word>,
|
||||
}
|
||||
|
||||
impl MerkleTree {
|
||||
@@ -108,6 +108,8 @@ impl MerkleTree {
|
||||
index.move_up();
|
||||
}
|
||||
|
||||
debug_assert!(index.is_root(), "the path must include the root");
|
||||
|
||||
Ok(path.into())
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user