Fix test.

This commit is contained in:
Peilun Li 2024-10-15 01:52:42 +08:00
parent 6a4b246e8b
commit 703d926a23

View File

@ -555,7 +555,7 @@ impl<E: HashElement, A: Algorithm<E>> AppendMerkleTree<E, A> {
.ok_or_else(|| anyhow!("tx_seq unavailable, root={:?}", tx_seq))? .ok_or_else(|| anyhow!("tx_seq unavailable, root={:?}", tx_seq))?
.clone(); .clone();
// Dropping the upper layers that are not in the old merkle tree. // Dropping the upper layers that are not in the old merkle tree.
for height in (delta_nodes.right_most_nodes.len()..(self.height() - 1)).rev() { for height in (delta_nodes.right_most_nodes.len()..self.height()).rev() {
self.node_manager.truncate_layer(height); self.node_manager.truncate_layer(height);
} }
for (height, (last_index, right_most_node)) in for (height, (last_index, right_most_node)) in