testutil

package
v0.1.0-alpha Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2022 License: Apache-2.0 Imports: 13 Imported by: 4

Documentation

Index

Constants

View Source
const (
	// DefaultBatchSize is the default batch size for testing
	DefaultBatchSize = 5
	// BlockVersion is the default block version for testing
	BlockVersion = 1
	// AppVersion is the default app version for testing
	AppVersion = 2
)

Variables

This section is empty.

Functions

func GenerateBatch

func GenerateBatch(startHeight uint64, endHeight uint64) *types.Batch

GenerateBatch generates a batch out of random blocks

func GenerateBlocks

func GenerateBlocks(startHeight uint64, num uint64) []*types.Block

GenerateBlocks generates random blocks.

func GenerateCommits

func GenerateCommits(blocks []*types.Block) []*types.Commit

GenerateCommits generates commits based on passed blocks.

func GenerateGenesis

func GenerateGenesis(initialHeight int64) *tmtypes.GenesisDoc

GenerateGenesis generates a genesis for testing.

func GenerateRandomValidatorSet

func GenerateRandomValidatorSet() *tmtypes.ValidatorSet

GenerateRandomValidatorSet generates random validator sets

func GenerateState

func GenerateState(initialHeight int64, lastBlockHeight int64) types.State

GenerateState generates an initial state for testing.

func GetABCIProxyAppMock

func GetABCIProxyAppMock(logger log.Logger) proxy.AppConns

GetABCIProxyAppMock returns a dummy abci proxy app mock for testing

Types

This section is empty.

Jump to

Keyboard shortcuts

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