diff --git a/app/test_helpers.go b/app/test_helpers.go index 263c1a9..fd90b3a 100644 --- a/app/test_helpers.go +++ b/app/test_helpers.go @@ -79,6 +79,13 @@ func SetupWithGenesisAccounts( ) *MinitiaApp { app, genesisState := setup(nil, true) + if genAccs == nil || len(genAccs) == 0 { + privAcc := secp256k1.GenPrivKey() + genAccs = []authtypes.GenesisAccount{ + authtypes.NewBaseAccount(privAcc.PubKey().Address().Bytes(), privAcc.PubKey(), 0, 0), + } + } + // set genesis accounts authGenesis := authtypes.NewGenesisState(authtypes.DefaultParams(), genAccs) genesisState[authtypes.ModuleName] = app.AppCodec().MustMarshalJSON(authGenesis) @@ -95,13 +102,6 @@ func SetupWithGenesisAccounts( valSet = tmtypes.NewValidatorSet([]*tmtypes.Validator{validator}) } - if genAccs == nil || len(genAccs) == 0 { - privAcc := secp256k1.GenPrivKey() - genAccs = []authtypes.GenesisAccount{ - authtypes.NewBaseAccount(privAcc.PubKey().Address().Bytes(), privAcc.PubKey(), 0, 0), - } - } - validators := make([]opchildtypes.Validator, 0, len(valSet.Validators)) for _, val := range valSet.Validators { diff --git a/cmd/minitiad/root.go b/cmd/minitiad/root.go index bf4bfb0..2ca8193 100644 --- a/cmd/minitiad/root.go +++ b/cmd/minitiad/root.go @@ -40,9 +40,6 @@ import ( "github.com/initia-labs/miniwasm/app/params" ) -// missing flag from cosmos-sdk -const flagIAVLCacheSize = "iavl-cache-size" - // NewRootCmd creates a new root command for initiad. It is called once in the // main function. func NewRootCmd() (*cobra.Command, params.EncodingConfig) {