crate-crypto / go-eth-kzg

Apache License 2.0
29 stars 22 forks source link

Fix some makezero findings #24

Closed jtraglia closed 1 year ago

jtraglia commented 1 year ago

The makezero correctly identified some problems:

internal/kzg/kzg_test.go:38:17: append to slice `commitments` with non-zero initialized length (makezero)
                commitments = append(commitments, comm)
                              ^
internal/kzg/kzg_test.go:39:12: append to slice `proofs` with non-zero initialized length (makezero)
                proofs = append(proofs, proof)
                         ^
internal/kzg/kzg_test.go:47:16: append to slice `commitments` with non-zero initialized length (makezero)
        commitments = append(commitments, bls12381.G1Affine{})
                      ^
internal/kzg/kzg_test.go:48:11: append to slice `proofs` with non-zero initialized length (makezero)
        proofs = append(proofs, proof)

This test was appending commitments/proofs to an array that was already initialized.

jtraglia commented 1 year ago

The linter failure is fixed in #22. Please merge it first.

kevaundray commented 1 year ago

Can merge after merge conflicts are resolved