This commit is contained in:
hu55a1n1 2023-12-31 08:44:29 -08:00
parent 94c951e53b
commit 931c7b0d6f

View file

@ -24,13 +24,10 @@ impl CwVerifier<'_> {
return Err(ProofError::EmptyMerkleRoot); return Err(ProofError::EmptyMerkleRoot);
} }
let value = Cow::Borrowed(value); self.0
let verified = self.0.verify_against_root(proofs, keys, &value, root)?; .verify_against_root(proofs, keys, &Cow::Borrowed(value), root)?
if !verified { .then_some(())
return Err(ProofError::VerificationFailure); .ok_or(ProofError::VerificationFailure)
}
Ok(())
} }
} }