Update nssa/src/merkle_tree/mod.rs

Co-authored-by: Sergio Chouhy <41742639+schouhy@users.noreply.github.com>
This commit is contained in:
jonesmarvin8 2025-09-05 16:28:13 -04:00 committed by GitHub
parent 1e7c3e1555
commit 26acdbed61
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -109,7 +109,7 @@ impl MerkleTree {
self.set_node(node_index, node_hash);
self.length += 1;
//updates Merkle path of the newly inserted node
// Update upper levels for the newly inserted node
for _ in 0..self.depth() {
let parent_index = (node_index - 1) >> 1;
let left_child = self.get_node((parent_index << 1) + 1);