update condition to align with source change (#368)

This commit is contained in:
0g-peterzhb 2025-04-30 20:26:04 +08:00 committed by GitHub
parent 17cb7657cd
commit 7972bf81d9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 2 deletions

View File

@ -13,7 +13,11 @@ 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!("Proof::new: expected hash length = path.len() + 2, but got {} and {}", hash.len(), path.len());
bail!(
"Proof::new: expected hash length = path.len() + 2, but got {} and {}",
hash.len(),
path.len()
);
}
Ok(Proof { lemma: hash, path })
}

View File

@ -162,7 +162,7 @@ class TestNode:
self.stderr.seek(0)
stderr = self.stderr.read().decode("utf-8").strip()
# TODO: Check how to avoid `pthread lock: Invalid argument`.
if stderr != expected_stderr and stderr != "pthread lock: Invalid argument":
if stderr != expected_stderr and stderr != "pthread lock: Invalid argument" and "pthread_mutex_lock" not in stderr:
# print process status for debug
if self.return_code is None:
self.log.info("Process is still running")