fix blobcount to use len(commitments)

This commit is contained in:
healthykim 2026-04-23 14:26:40 +02:00
parent b950503b89
commit 61cfa9e126
2 changed files with 2 additions and 4 deletions

View file

@ -213,8 +213,7 @@ func ckzgVerifyCells(cells []Cell, commitments []Commitment, cellProofs []Proof,
commits = append(commits, (ckzg4844.Bytes48)(commitment)) commits = append(commits, (ckzg4844.Bytes48)(commitment))
} }
} }
blobCounts := len(cellProofs) / len(cellIndices) for j := 0; j < len(commitments); j++ {
for j := 0; j < blobCounts; j++ {
indices = append(indices, cellIndices...) indices = append(indices, cellIndices...)
} }

View file

@ -172,8 +172,7 @@ func gokzgVerifyCells(cells []Cell, commitments []Commitment, cellProofs []Proof
commits = append(commits, gokzg4844.KZGCommitment(commitment)) commits = append(commits, gokzg4844.KZGCommitment(commitment))
} }
} }
blobCounts := len(cellProofs) / len(cellIndices) for j := 0; j < len(commitments); j++ {
for j := 0; j < blobCounts; j++ {
indices = append(indices, cellIndices...) indices = append(indices, cellIndices...)
} }