Skip to content

Commit a37f5d3

Browse files
committed
Always validate with CascadingMerkleTree::new
1 parent b95381d commit a37f5d3

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/cascading_merkle_tree.rs

+1-3
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,7 @@ where
6060
// Safe because we're calling `.validate` on the tree later
6161
let tree = unsafe { Self::new_unchecked(storage, depth, empty_value)? };
6262

63-
if !tree.storage.is_empty() {
64-
tree.validate()?;
65-
}
63+
tree.validate()?;
6664

6765
Ok(tree)
6866
}

0 commit comments

Comments
 (0)