Skip to content

Commit

Permalink
chore: comment out unused functions
Browse files Browse the repository at this point in the history
  • Loading branch information
nugaon committed Sep 19, 2023
1 parent d6b0f09 commit d8e86cc
Showing 1 changed file with 28 additions and 30 deletions.
58 changes: 28 additions & 30 deletions pkg/storageincentives/redistribution/redistribution_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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()
Expand Down

0 comments on commit d8e86cc

Please sign in to comment.