chore: Lazy initialize the KZG struct when running tests (#6311)

* use LazyLock when initializing KZG struct

* update get_kzg to return Arc<KZG> and not a Result<Arc<KZG>>

* Revert orthogonal changes to `kzg_verify_cell_kzg_proof_batch`

* add back map_err
This commit is contained in:
kevaundray
2024-08-28 07:43:17 +01:00
committed by GitHub
parent 5e9cc60dd7
commit 5a966874da
9 changed files with 21 additions and 12 deletions

View File

@@ -50,7 +50,7 @@ impl<E: EthSpec> Case for KZGComputeKZGProof<E> {
Ok((blob, z))
};
let kzg = get_kzg()?;
let kzg = get_kzg();
let proof = parse_input(&self.input).and_then(|(blob, z)| {
compute_kzg_proof::<E>(&kzg, &blob, z)
.map_err(|e| Error::InternalError(format!("Failed to compute kzg proof: {:?}", e)))