diff --git a/types/src/cryptography/merkle_tree.rs b/types/src/cryptography/merkle_tree.rs index 0c3096b6..0ac1ae5b 100644 --- a/types/src/cryptography/merkle_tree.rs +++ b/types/src/cryptography/merkle_tree.rs @@ -432,7 +432,10 @@ impl MerkleTree { let reconstructed_root = match (stack.len(), path.len()) { (1, 0) => stack.remove(0), (0, 1) => path.remove(0), - _ => panic!("invalid multiproof: invalid total hashes"), + _ => { + tracing::debug!("invalid multiproof: invalid total hashes"); + return false; + } }; root == reconstructed_root