mirror of
https://gitlab.com/pulsechaincom/lighthouse-pulse.git
synced 2024-12-22 03:30:38 +00:00
Remove empty blob handling as it's handled in kzg library
This commit is contained in:
parent
e548073602
commit
0ed3f7474c
@ -19,8 +19,6 @@ pub enum Error {
|
||||
InvalidKzgCommitment(CKzgError),
|
||||
InvalidKzgProof(CKzgError),
|
||||
KzgVerificationFailed(CKzgError),
|
||||
EmptyBlobs,
|
||||
EmptyKzgCommitments,
|
||||
InvalidLength(String),
|
||||
KzgProofComputationFailed(CKzgError),
|
||||
}
|
||||
@ -39,9 +37,6 @@ impl Kzg {
|
||||
}
|
||||
|
||||
pub fn compute_aggregate_kzg_proof(&self, blobs: &[Blob]) -> Result<KzgProof, Error> {
|
||||
if blobs.len() == 0 {
|
||||
return Err(Error::EmptyBlobs);
|
||||
}
|
||||
c_kzg::KZGProof::compute_aggregate_kzg_proof(blobs, &self.trusted_setup)
|
||||
.map_err(Error::KzgProofComputationFailed)
|
||||
.map(|proof| KzgProof(proof.to_bytes()))
|
||||
@ -53,12 +48,6 @@ impl Kzg {
|
||||
expected_kzg_commitments: &[KzgCommitment],
|
||||
kzg_aggregated_proof: KzgProof,
|
||||
) -> Result<bool, Error> {
|
||||
if blobs.len() == 0 {
|
||||
return Err(Error::EmptyBlobs);
|
||||
}
|
||||
if expected_kzg_commitments.len() == 0 {
|
||||
return Err(Error::EmptyBlobs);
|
||||
}
|
||||
if blobs.len() != expected_kzg_commitments.len() {
|
||||
return Err(Error::InvalidLength(
|
||||
"blobs and expected_kzg_commitments should be of same size".to_string(),
|
||||
|
Loading…
Reference in New Issue
Block a user