diff --git a/pkg/storageincentives/redistribution/redistribution_test.go b/pkg/storageincentives/redistribution/redistribution_test.go index 3f61e4e1531..321681f7f04 100644 --- a/pkg/storageincentives/redistribution/redistribution_test.go +++ b/pkg/storageincentives/redistribution/redistribution_test.go @@ -7,13 +7,10 @@ package redistribution_test import ( "bytes" "context" - "encoding/hex" "errors" "fmt" "math/big" - "strconv" "testing" - "time" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" @@ -30,33 +27,34 @@ import ( var redistributionContractABI = abiutil.MustParseABI(chaincfg.Testnet.RedistributionABI) -func randChunkInclusionProof(t *testing.T) redistribution.ChunkInclusionProof { - t.Helper() - - return redistribution.ChunkInclusionProof{ - ProofSegments: []string{hex.EncodeToString(testutil.RandBytes(t, 32))}, - ProveSegment: hex.EncodeToString(testutil.RandBytes(t, 32)), - ProofSegments2: []string{hex.EncodeToString(testutil.RandBytes(t, 32))}, - ProveSegment2: hex.EncodeToString(testutil.RandBytes(t, 32)), - ProofSegments3: []string{hex.EncodeToString(testutil.RandBytes(t, 32))}, - ChunkSpan: 1, - Signature: string(testutil.RandBytes(t, 32)), - ChunkAddr: hex.EncodeToString(testutil.RandBytes(t, 32)), - PostageId: hex.EncodeToString(testutil.RandBytes(t, 32)), - Index: hex.EncodeToString(testutil.RandBytes(t, 32)), - TimeStamp: strconv.Itoa(time.Now().Nanosecond()), - } -} - -func randChunkInclusionProofs(t *testing.T) redistribution.ChunkInclusionProofs { - t.Helper() - - return redistribution.ChunkInclusionProofs{ - A: randChunkInclusionProof(t), - B: randChunkInclusionProof(t), - C: randChunkInclusionProof(t), - } -} +// TODO uncomment when ABI is updated +// func randChunkInclusionProof(t *testing.T) redistribution.ChunkInclusionProof { +// t.Helper() + +// return redistribution.ChunkInclusionProof{ +// ProofSegments: []string{hex.EncodeToString(testutil.RandBytes(t, 32))}, +// ProveSegment: hex.EncodeToString(testutil.RandBytes(t, 32)), +// ProofSegments2: []string{hex.EncodeToString(testutil.RandBytes(t, 32))}, +// ProveSegment2: hex.EncodeToString(testutil.RandBytes(t, 32)), +// ProofSegments3: []string{hex.EncodeToString(testutil.RandBytes(t, 32))}, +// ChunkSpan: 1, +// Signature: string(testutil.RandBytes(t, 32)), +// ChunkAddr: hex.EncodeToString(testutil.RandBytes(t, 32)), +// PostageId: hex.EncodeToString(testutil.RandBytes(t, 32)), +// Index: hex.EncodeToString(testutil.RandBytes(t, 32)), +// TimeStamp: strconv.Itoa(time.Now().Nanosecond()), +// } +// } + +// func randChunkInclusionProofs(t *testing.T) redistribution.ChunkInclusionProofs { +// t.Helper() + +// return redistribution.ChunkInclusionProofs{ +// A: randChunkInclusionProof(t), +// B: randChunkInclusionProof(t), +// C: randChunkInclusionProof(t), +// } +// } func TestRedistribution(t *testing.T) { t.Parallel()