Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
beer-1 committed Dec 12, 2023
1 parent c4fdf2a commit 1e9b725
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
14 changes: 7 additions & 7 deletions app/test_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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 {
Expand Down
3 changes: 0 additions & 3 deletions cmd/minitiad/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 1e9b725

Please sign in to comment.