mirror of
https://github.com/status-im/c-kzg-4844.git
synced 2025-02-02 21:34:16 +00:00
Add n=0 special case for compute_aggregate_kzg_proof
This commit is contained in:
parent
c8fab42ac0
commit
084fd2209e
@ -1146,6 +1146,11 @@ C_KZG_RET compute_aggregate_kzg_proof(KZGProof *out,
|
|||||||
const Blob blobs[],
|
const Blob blobs[],
|
||||||
size_t n,
|
size_t n,
|
||||||
const KZGSettings *s) {
|
const KZGSettings *s) {
|
||||||
|
if (n == 0) {
|
||||||
|
*out = g1_identity;
|
||||||
|
return C_KZG_OK;
|
||||||
|
}
|
||||||
|
|
||||||
KZGCommitment* commitments = calloc(n, sizeof(KZGCommitment));
|
KZGCommitment* commitments = calloc(n, sizeof(KZGCommitment));
|
||||||
if (commitments == NULL) return C_KZG_MALLOC;
|
if (commitments == NULL) return C_KZG_MALLOC;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user