From 945ec47cf3a9bb4a1e1bb5a8107fad12abd790cf Mon Sep 17 00:00:00 2001 From: Ubuntu Date: Tue, 5 Dec 2023 00:29:03 +0000 Subject: [PATCH] fix test --- pkg/encoding/kzgEncoder/multiframe_test.go | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/pkg/encoding/kzgEncoder/multiframe_test.go b/pkg/encoding/kzgEncoder/multiframe_test.go index a87e0af81..61b0c348e 100644 --- a/pkg/encoding/kzgEncoder/multiframe_test.go +++ b/pkg/encoding/kzgEncoder/multiframe_test.go @@ -1,9 +1,10 @@ -package kzgEncoder +package kzgEncoder_test import ( "testing" rs "github.com/Layr-Labs/eigenda/pkg/encoding/encoder" + kzgRs "github.com/Layr-Labs/eigenda/pkg/encoding/kzgEncoder" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) @@ -12,13 +13,13 @@ func TestUniversalVerify(t *testing.T) { teardownSuite := setupSuite(t) defer teardownSuite(t) - group, _ := NewKzgEncoderGroup(kzgConfig) + group, _ := kzgRs.NewKzgEncoderGroup(kzgConfig) params := rs.GetEncodingParams(numSys, numPar, uint64(len(GETTYSBURG_ADDRESS_BYTES))) enc, err := group.NewKzgEncoder(params) require.Nil(t, err) numBlob := 5 - samples := make([]Sample, 0) + samples := make([]kzgRs.Sample, 0) for z := 0; z < numBlob; z++ { inputFr := rs.ToFrArray(GETTYSBURG_ADDRESS_BYTES) @@ -35,16 +36,16 @@ func TestUniversalVerify(t *testing.T) { assert.Equal(t, j, q, "leading coset inconsistency") - sample = Sample{ - Commitment: commit, + sample := kzgRs.Sample{ + Commitment: *commit, Proof: f.Proof, Row: z, Coeffs: f.Coeffs, - X: i, + X: uint(i), } samples = append(samples, sample) } } - assert.True(t, group.UniversalVerify(params, samples, numBlob), "universal batch verification failed\n") + assert.True(t, group.UniversalVerify(params, samples, numBlob) == nil, "universal batch verification failed\n") }