Cleanup
This commit is contained in:
parent
94c951e53b
commit
931c7b0d6f
1 changed files with 4 additions and 7 deletions
|
@ -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(())
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue