Skip to content

Commit

Permalink
panics section
Browse files Browse the repository at this point in the history
  • Loading branch information
mm-zk committed Oct 4, 2023
1 parent c2755fe commit e82b7e3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions core/lib/mini_merkle_tree/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ impl<'a, const LEAF_SIZE: usize> MiniMerkleTree<'a, LEAF_SIZE> {
}

/// Returns the root hash of this tree.
/// # Panics
/// Will panic if the constant below is invalid.
pub fn merkle_root(self) -> H256 {
if self.hashes.is_empty() {
H256::from_str("fef7bd9f889811e59e4076a0174087135f080177302763019adaf531257e3a87")
Expand Down

0 comments on commit e82b7e3

Please sign in to comment.