testutil

package
v8.0.0-...-5471dbc Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2025 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const ChainID = "chainmain-1"

Variables

View Source
var DefaultConsensusParams = &cmtproto.ConsensusParams{
	Block: &cmtproto.BlockParams{
		MaxBytes: 1048576,
		MaxGas:   81500000,
	},
	Evidence: &cmtproto.EvidenceParams{
		MaxAgeNumBlocks: 302400,
		MaxAgeDuration:  504 * time.Hour,
		MaxBytes:        10000,
	},
	Validator: &cmtproto.ValidatorParams{
		PubKeyTypes: []string{
			tmtypes.ABCIPubKeyTypeEd25519,
		},
	},
}

DefaultConsensusParams defines the default Tendermint consensus params used in ChainApp testing.

Functions

func NewTestGenesisState

func NewTestGenesisState(codec codec.Codec, genesisState map[string]json.RawMessage) app.GenesisState

NewTestGenesisState generate genesis state with single validator

func Setup

func Setup(isCheckTx bool, patch func(*app.ChainApp, app.GenesisState) app.GenesisState) *app.ChainApp

Setup initializes a new ChainApp. A Nop logger is set in ChainApp.

func SetupWithDB

func SetupWithDB(isCheckTx bool, patch func(*app.ChainApp, app.GenesisState) app.GenesisState, db dbm.DB) *app.ChainApp

func SetupWithDBAndOpts

func SetupWithDBAndOpts(
	isCheckTx bool,
	patch func(*app.ChainApp, app.GenesisState) app.GenesisState,
	db dbm.DB,
	appOptions simtestutil.AppOptionsMap,
) *app.ChainApp

SetupWithDBAndOpts initializes a new ChainApp. A Nop logger is set in ChainApp.

func SetupWithOpts

func SetupWithOpts(
	isCheckTx bool,
	patch func(*app.ChainApp, app.GenesisState) app.GenesisState,
	appOptions simtestutil.AppOptionsMap,
) *app.ChainApp

func StateFn

func StateFn(a *app.ChainApp) simtypes.AppStateFn

Types

type BaseTestSuite

type BaseTestSuite struct {
	suite.Suite

	Ctx sdk.Context
	App *app.ChainApp
}

Jump to

Keyboard shortcuts

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