testfactory

package
v2.3.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 30, 2024 License: Apache-2.0 Imports: 16 Imported by: 2

Documentation

Index

Constants

View Source
const (
	// nolint:lll
	TestAccName  = "test-account"
	TestAccAddr  = "celestia1g39egf59z8tud3lcyjg5a83m20df4kccx32qkp"
	TestAccMnemo = `` /* 162-byte string literal not displayed */
	ChainID      = "test-app"
)

Variables

This section is empty.

Functions

func CheckSubArray

func CheckSubArray(txList []types.Tx, subTxList []types.Tx) bool

CheckSubArray returns whether subTxList is a subarray of txList

func DelimLen

func DelimLen(size uint64) int

DelimLen calculates the length of the delimiter for a given unit size

func GenerateAccounts

func GenerateAccounts(count int) []string

func GenerateBlobsWithNamespace

func GenerateBlobsWithNamespace(count int, blobSize int, ns appns.Namespace) []types.Blob

GenerateBlobsWithNamespace generates blobs with namespace ns.

func GenerateRandNamespacedRawData

func GenerateRandNamespacedRawData(count int) (result [][]byte)

GenerateRandNamespacedRawData returns random data of length count. Each chunk of random data is of size shareSize and is prefixed with a random blob namespace.

func GenerateRandomBlob

func GenerateRandomBlob(dataSize int) *blob.Blob

func GenerateRandomBlobOfShareCount

func GenerateRandomBlobOfShareCount(count int) *blob.Blob

GenerateRandomBlobOfShareCount returns a blob that spans the given number of shares

func GenerateRandomTxs

func GenerateRandomTxs(count, size int) types.Txs

func GenerateRandomlySizedBlobs

func GenerateRandomlySizedBlobs(count, maxBlobSize int) []*blob.Blob

func GenerateRandomlySizedTxs

func GenerateRandomlySizedTxs(count, maxSize int) types.Txs

func GetAddress

func GetAddress(keys keyring.Keyring, account string) sdk.AccAddress

func GetAddresses

func GetAddresses(keys keyring.Keyring) []sdk.AccAddress

func GetRandomSubSlice

func GetRandomSubSlice(size int) (start int, length int)

GetRandomSubSlice returns two integers representing a randomly sized range in the interval [0, size]

func RandomAccountNames

func RandomAccountNames(count int) []string

func RandomBlobNamespace

func RandomBlobNamespace() ns.Namespace

func RandomBlobNamespaceIDWithPRG

func RandomBlobNamespaceIDWithPRG(prg *tmrand.Rand) []byte

RandomBlobNamespaceIDWithPRG returns a random blob namespace ID using the supplied Pseudo-Random number Generator (PRG).

func RandomBlobNamespaceWithPRG

func RandomBlobNamespaceWithPRG(prg *tmrand.Rand) ns.Namespace

RandomBlobNamespaceWithPRG generates and returns a random blob namespace using the supplied Pseudo-Random number Generator (PRG).

func RandomBlobNamespaces

func RandomBlobNamespaces(rand *tmrand.Rand, count int) (namespaces []ns.Namespace)

func RandomEVMAddress

func RandomEVMAddress() gethcommon.Address

func Repeat

func Repeat[T any](s T, count int) []T

func TestKeyring

func TestKeyring(cdc codec.Codec, accounts ...string) keyring.Keyring

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL