mirror of
https://github.com/arnaucube/miden-crypto.git
synced 2026-01-26 05:53:47 +01:00
Smt: remove inner nodes when removing value (#269)
This commit is contained in:
committed by
Bobbin Threadbare
parent
da12fd258a
commit
3d71a9b59b
@@ -275,6 +275,10 @@ impl<const DEPTH: u8> SparseMerkleTree<DEPTH> for SimpleSmt<DEPTH> {
|
||||
self.inner_nodes.insert(index, inner_node);
|
||||
}
|
||||
|
||||
fn remove_inner_node(&mut self, index: NodeIndex) {
|
||||
let _ = self.inner_nodes.remove(&index);
|
||||
}
|
||||
|
||||
fn insert_value(&mut self, key: LeafIndex<DEPTH>, value: Word) -> Option<Word> {
|
||||
self.leaves.insert(key.value(), value)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user