This commit is contained in:
ricecodekhmer 2025-03-30 16:11:56 +01:00 committed by GitHub
commit 5d6f535402
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -13,7 +13,7 @@ impl<T: HashElement> Proof<T> {
/// Creates new MT inclusion proof
pub fn new(hash: Vec<T>, path: Vec<bool>) -> Result<Proof<T>> {
if hash.len() != path.len() + 2 {
bail!("hash and path length mismatch");
bail!("Proof::new: expected hash length = path.len() + 2, but got {} and {}", hash.len(), path.len());
}
Ok(Proof { lemma: hash, path })
}