mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-06 10:11:44 +00:00
Remove blob clones in KZG verification (#4852)
## Issue Addressed This PR removes two instances of blob clones during blob verification that may not be necessary.
This commit is contained in:
@@ -91,7 +91,7 @@ impl<E: EthSpec> Case for KZGVerifyBlobKZGProof<E> {
|
||||
|
||||
let kzg = get_kzg::<E::Kzg>()?;
|
||||
let result = parse_input(&self.input).and_then(|(blob, commitment, proof)| {
|
||||
validate_blob::<E>(&kzg, blob, commitment, proof)
|
||||
validate_blob::<E>(&kzg, &blob, commitment, proof)
|
||||
.map_err(|e| Error::InternalError(format!("Failed to validate blob: {:?}", e)))
|
||||
});
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@ impl<E: EthSpec> Case for KZGVerifyBlobKZGProofBatch<E> {
|
||||
|
||||
let kzg = get_kzg::<E::Kzg>()?;
|
||||
let result = parse_input(&self.input).and_then(|(commitments, blobs, proofs)| {
|
||||
validate_blobs::<E>(&kzg, &commitments, &blobs, &proofs)
|
||||
validate_blobs::<E>(&kzg, &commitments, blobs.iter().collect(), &proofs)
|
||||
.map_err(|e| Error::InternalError(format!("Failed to validate blobs: {:?}", e)))
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user