mirror of
https://github.com/logos-blockchain/lssa.git
synced 2026-01-07 07:43:11 +00:00
Update nssa/src/merkle_tree/mod.rs
Co-authored-by: Sergio Chouhy <41742639+schouhy@users.noreply.github.com>
This commit is contained in:
parent
1e7c3e1555
commit
26acdbed61
@ -109,7 +109,7 @@ impl MerkleTree {
|
|||||||
self.set_node(node_index, node_hash);
|
self.set_node(node_index, node_hash);
|
||||||
self.length += 1;
|
self.length += 1;
|
||||||
|
|
||||||
//updates Merkle path of the newly inserted node
|
// Update upper levels for the newly inserted node
|
||||||
for _ in 0..self.depth() {
|
for _ in 0..self.depth() {
|
||||||
let parent_index = (node_index - 1) >> 1;
|
let parent_index = (node_index - 1) >> 1;
|
||||||
let left_child = self.get_node((parent_index << 1) + 1);
|
let left_child = self.get_node((parent_index << 1) + 1);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user