mirror of
https://github.com/arnaucube/miden-crypto.git
synced 2026-01-12 09:01:29 +01:00
Merge pull request #173 from 0xPolygonMiden/bobbin-tsmt-refactor
Implement value clearing in TSMT
This commit is contained in:
@@ -118,7 +118,7 @@ impl PartialMerkleTree {
|
||||
|
||||
// fill layers without nodes with empty vector
|
||||
for depth in 0..max_depth {
|
||||
layers.entry(depth).or_insert(vec![]);
|
||||
layers.entry(depth).or_default();
|
||||
}
|
||||
|
||||
let mut layer_iter = layers.into_values().rev();
|
||||
@@ -372,7 +372,6 @@ impl PartialMerkleTree {
|
||||
return Ok(old_value);
|
||||
}
|
||||
|
||||
let mut node_index = node_index;
|
||||
let mut value = value.into();
|
||||
for _ in 0..node_index.depth() {
|
||||
let sibling = self.nodes.get(&node_index.sibling()).expect("sibling should exist");
|
||||
|
||||
Reference in New Issue
Block a user