Documentation ¶
Index ¶
- Variables
- func ComplexBlobTxWithOtherMsgs(t *testing.T, rand *tmrand.Rand, signer *user.Signer, msgs ...sdk.Msg) coretypes.Tx
- func DefaultTxOpts() []user.TxOption
- func FeeTxOpts(gas uint64) []user.TxOption
- func GenerateManyRandomRawSendTxsSameSigner(rand *tmrand.Rand, signer *user.Signer, count int) []coretypes.Tx
- func GenerateManyRawSendTxs(signer *user.Signer, count int) []coretypes.Tx
- func GenerateRandomAmount(rand *tmrand.Rand) int64
- func GenerateRandomBlobCount(rand *tmrand.Rand) int
- func GenerateRandomBlobSize(rand *tmrand.Rand) int
- func GenerateRandomBlobSizes(count int, rand *tmrand.Rand) []int
- func GenerateRandomRawSendTx(rand *tmrand.Rand, signer *user.Signer) (rawTx []byte)
- func GenerateRawSendTx(signer *user.Signer, amount int64) []byte
- func IndexWrappedTxWithInvalidNamespace(t *testing.T, rand *tmrand.Rand, signer *user.Signer, index uint32) (coretypes.Tx, blob.Blob)
- func ManyBlobs(rand *tmrand.Rand, namespaces []appns.Namespace, sizes []int) []*blob.Blob
- func ManyMultiBlobTx(t *testing.T, enc client.TxConfig, kr keyring.Keyring, chainid string, ...) [][]byte
- func ManyRandBlobs(rand *tmrand.Rand, sizes ...int) []*blob.Blob
- func NestedBlobs(t *testing.T, namespaces []appns.Namespace, sizes [][]int) [][]*blob.Blob
- func RandBlobTxs(signer *user.Signer, rand *tmrand.Rand, count, blobsPerTx, size int) coretypes.Txs
- func RandBlobTxsRandomlySized(signer *user.Signer, rand *tmrand.Rand, count, maxSize, maxBlobs int) coretypes.Txs
- func RandBlobTxsWithAccounts(enc encoding.Config, rand *tmrand.Rand, kr keyring.Keyring, ...) []coretypes.Tx
- func RandBlobTxsWithNamespacesAndSigner(signer *user.Signer, namespaces []appns.Namespace, sizes []int) []coretypes.Tx
- func RandBlobsWithNamespace(namespaces []appns.Namespace, sizes []int) []*blob.Blob
- func RandMsgPayForBlobs(rand *tmrand.Rand, size int) (*blobtypes.MsgPayForBlobs, *blob.Blob)
- func RandMsgPayForBlobsWithNamespaceAndSigner(signer string, ns appns.Namespace, size int) (*blobtypes.MsgPayForBlobs, *blob.Blob)
- func RandMsgPayForBlobsWithSigner(rand *tmrand.Rand, signer string, size, blobCount int) (*blobtypes.MsgPayForBlobs, []*blob.Blob)
- func RandMultiBlobTxsSameSigner(t *testing.T, rand *tmrand.Rand, signer *user.Signer, pfbCount int) []coretypes.Tx
- func Repeat[T any](s T, count int) []T
- type AccountInfo
Constants ¶
This section is empty.
Variables ¶
var ( // TestMaxBlobSize is the maximum size of each blob in a blob transaction, for testing purposes TestMaxBlobSize = appconsts.ShareSize * 2 * appconsts.DefaultSquareSizeUpperBound // TestMaxBlobCount is the maximum number of blobs in a blob transaction, for testing purposes TestMaxBlobCount = 5 )
Functions ¶
func DefaultTxOpts ¶ added in v1.12.0
func GenerateManyRandomRawSendTxsSameSigner ¶
func GenerateManyRandomRawSendTxsSameSigner(rand *tmrand.Rand, signer *user.Signer, count int) []coretypes.Tx
GenerateManyRandomRawSendTxsSameSigner generates count many random raw send txs.
func GenerateManyRawSendTxs ¶
func GenerateRandomAmount ¶
GenerateRandomAmount generates a random amount for a Send transaction.
func GenerateRandomBlobCount ¶
func GenerateRandomBlobSize ¶
func GenerateRandomBlobSizes ¶
GenerateRandomBlobSizes returns a slice of random non-zero blob sizes.
func GenerateRandomRawSendTx ¶
GenerateRandomRawSendTx generates a random raw send tx.
func GenerateRawSendTx ¶
GenerateRawSendTx creates send transactions meant to help test encoding/prepare/process proposal, they are not meant to actually be executed by the state machine. If we want that, we have to update nonce, and send funds to someone other than the same account signing the transaction.
func IndexWrappedTxWithInvalidNamespace ¶
func IndexWrappedTxWithInvalidNamespace( t *testing.T, rand *tmrand.Rand, signer *user.Signer, index uint32, ) (coretypes.Tx, blob.Blob)
IndexWrappedTxWithInvalidNamespace returns an index wrapped PFB tx with an invalid namespace and a blob associated with that index wrapped PFB tx.
func ManyMultiBlobTx ¶
func NestedBlobs ¶
func RandBlobTxs ¶
func RandBlobTxsWithAccounts ¶
func RandBlobTxsWithAccounts( enc encoding.Config, rand *tmrand.Rand, kr keyring.Keyring, conn *grpc.ClientConn, size int, blobCount int, randSize bool, accounts []string, ) []coretypes.Tx
RandBlobTxsWithAccounts will create random blob transactions using the provided configuration. If no grpc connection is provided, then it will not update the account info. One blob transaction is generated per account provided.
func RandBlobsWithNamespace ¶
func RandMsgPayForBlobs ¶
func RandMultiBlobTxsSameSigner ¶
func RandMultiBlobTxsSameSigner(t *testing.T, rand *tmrand.Rand, signer *user.Signer, pfbCount int) []coretypes.Tx
RandMultiBlobTxsSameSigner returns a slice of random Blob transactions (consisting of pfbCount number of txs) each with random number of blobs and blob sizes.
Types ¶
type AccountInfo ¶
type AccountInfo struct {
AccountNum, Sequence uint64
}
func ExtractAccountInfo ¶
func ExtractAccountInfo(accs []authtypes.AccountI) []AccountInfo