Version: v1.0.4-alpha Latest Latest

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

Go to latest
Published: Apr 27, 2022 License: Apache-2.0 Imports: 24 Imported by: 0




This section is empty.


This section is empty.


func New

func New(dir string) *app.App

New creates application instance with in-memory database and disabled logging.

func SetupWithGenesisAccounts

func SetupWithGenesisAccounts(t *testing.T, dir string, genAccs []authtypes.GenesisAccount, balances ...banktypes.Balance) *app.App

SetupWithGenesisAccounts initializes a new SimApp with the provided genesis accounts and possible balances.

func SetupWithGenesisValSet

func SetupWithGenesisValSet(t *testing.T, dir string, valSet *tmtypes.ValidatorSet, genAccs []authtypes.GenesisAccount, balances ...banktypes.Balance) *app.App

SetupWithGenesisValSet initializes a new SimApp with a validator set and genesis accounts that also act as delegators. For simplicity, each validator is bonded with a delegation of one consensus engine unit in the default token of the simapp from first genesis account. A Nop logger is set in SimApp.

func SignCheckDeliver

func SignCheckDeliver(
	t *testing.T, txCfg client.TxConfig, app *bam.BaseApp, header tmproto.Header, msgs []sdk.Msg,
	chainID string, accNums, accSeqs []uint64, simulate bool, expSimPass, expPass bool, priv ...cryptotypes.PrivKey,
) (sdk.GasInfo, *sdk.Result, error)

SignCheckDeliver checks a generated signed transaction and simulates a block commitment with the given transaction. A test assertion is made using the parameter 'expPass' against the result. A corresponding result is returned.


type PV

type PV struct {
	PrivKey cryptotypes.PrivKey

MockPV implements PrivValidator without any safety or persistence. Only use it for testing.

func NewPV

func NewPV() PV

func (PV) GetPubKey

func (pv PV) GetPubKey() (crypto.PubKey, error)

GetPubKey implements PrivValidator interface

func (PV) SignProposal

func (pv PV) SignProposal(chainID string, proposal *tmproto.Proposal) error

SignProposal implements PrivValidator interface

func (PV) SignVote

func (pv PV) SignVote(chainID string, vote *tmproto.Vote) error

SignVote implements PrivValidator interface

Jump to

Keyboard shortcuts

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