Skip to content

Commit

Permalink
chore: remove unused GenerateValidBlockData from app package
Browse files Browse the repository at this point in the history
  • Loading branch information
vidhanarya committed Nov 29, 2022
1 parent 47ceb96 commit fbca36f
Showing 1 changed file with 0 additions and 33 deletions.
33 changes: 0 additions & 33 deletions app/test_util.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,41 +11,8 @@ import (
banktypes "github.com/cosmos/cosmos-sdk/x/bank/types"
"github.com/stretchr/testify/require"
tmrand "github.com/tendermint/tendermint/libs/rand"
core "github.com/tendermint/tendermint/proto/tendermint/types"
coretypes "github.com/tendermint/tendermint/types"
)

func GenerateValidBlockData(
t *testing.T,
txConfig client.TxConfig,
signer *types.KeyringSigner,
pfbCount,
normalTxCount,
size int,
) (coretypes.Data, error) {
rawTxs := GenerateManyRawWirePFB(t, txConfig, signer, pfbCount, size)
rawTxs = append(rawTxs, GenerateManyRawSendTxs(t, txConfig, signer, normalTxCount)...)
parsedTxs := parseTxs(txConfig, rawTxs)

squareSize, totalSharesUsed := estimateSquareSize(parsedTxs, core.EvidenceList{})

if totalSharesUsed > int(squareSize*squareSize) {
parsedTxs = prune(txConfig, parsedTxs, totalSharesUsed, int(squareSize))
}

processedTxs, blobs, err := malleateTxs(txConfig, squareSize, parsedTxs, core.EvidenceList{})
require.NoError(t, err)

blockData := core.Data{
Txs: processedTxs,
Evidence: core.EvidenceList{},
Blobs: blobs,
SquareSize: squareSize,
}

return coretypes.DataFromProto(&blockData)
}

// GenerateManyRawWirePFB creates many raw WirePayForBlob transactions. Using
// negative numbers for count and size will randomize those values. count is
// capped at 5000 and size is capped at 3MB. Going over these caps will result
Expand Down

0 comments on commit fbca36f

Please sign in to comment.