Documentation ¶
Index ¶
- Constants
- Variables
- func AddGenesisAccount(addr sdk.AccAddress, appState app.GenesisState, cdc codec.Codec) (map[string]json.RawMessage, error)
- func GenesisStateWithSingleValidator(testApp *app.App, genAccounts ...string) (app.GenesisState, *tmtypes.ValidatorSet, keyring.Keyring)
- func NewDefaultGenesisState(cdc codec.JSONCodec) app.GenesisState
- func SetupTestAppWithGenesisValSet(genAccounts ...string) (*app.App, keyring.Keyring)
Constants ¶
const (
ChainID = "testapp"
)
Variables ¶
var DefaultConsensusParams = &abci.ConsensusParams{ Block: &abci.BlockParams{ MaxBytes: 200000, MaxGas: 2000000, }, Evidence: &tmproto.EvidenceParams{ MaxAgeNumBlocks: 302400, MaxAgeDuration: 504 * time.Hour, MaxBytes: 10000, }, Validator: &tmproto.ValidatorParams{ PubKeyTypes: []string{ tmtypes.ABCIPubKeyTypeEd25519, }, }, }
DefaultConsensusParams defines the default Tendermint consensus params used in SimApp testing.
Functions ¶
func AddGenesisAccount ¶
func AddGenesisAccount(addr sdk.AccAddress, appState app.GenesisState, cdc codec.Codec) (map[string]json.RawMessage, error)
AddGenesisAccount mimics the cli addGenesisAccount command, providing an account with an allocation of to "token" and "tia" tokens in the genesis state
func GenesisStateWithSingleValidator ¶
func GenesisStateWithSingleValidator(testApp *app.App, genAccounts ...string) (app.GenesisState, *tmtypes.ValidatorSet, keyring.Keyring)
GenesisStateWithSingleValidator initializes GenesisState with a single validator and genesis accounts that also act as delegators.
func NewDefaultGenesisState ¶
func NewDefaultGenesisState(cdc codec.JSONCodec) app.GenesisState
NewDefaultGenesisState generates the default state for the application.
func SetupTestAppWithGenesisValSet ¶
SetupTestAppWithGenesisValSet initializes a new app 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 app from first genesis account. A Nop logger is set in app.
Types ¶
This section is empty.