Skip to content

Commit

Permalink
test: fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
dudong2 committed Dec 5, 2023
1 parent aa436e8 commit 59e77ef
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 9 deletions.
16 changes: 12 additions & 4 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -611,7 +611,15 @@ func NewEthermintApp(
feegrantmodule.NewAppModule(appCodec, app.AccountKeeper, app.BankKeeper, app.FeeGrantKeeper, app.interfaceRegistry),
gov.NewAppModule(appCodec, &app.GovKeeper, app.AccountKeeper, app.BankKeeper, app.GetSubspace(govtypes.ModuleName)),
mint.NewAppModule(appCodec, app.MintKeeper, app.AccountKeeper, nil, app.GetSubspace(minttypes.ModuleName)),
slashing.NewAppModule(appCodec, app.SlashingKeeper, app.AccountKeeper, app.BankKeeper, app.StakingKeeper, app.GetSubspace(slashingtypes.ModuleName), app.interfaceRegistry),
slashing.NewAppModule(
appCodec,
app.SlashingKeeper,
app.AccountKeeper,
app.BankKeeper,
app.StakingKeeper,
app.GetSubspace(slashingtypes.ModuleName),
app.interfaceRegistry,
),
distr.NewAppModule(appCodec, app.DistrKeeper, app.AccountKeeper, app.BankKeeper, app.StakingKeeper, app.GetSubspace(distrtypes.ModuleName)),
staking.NewAppModule(appCodec, app.StakingKeeper, app.AccountKeeper, app.BankKeeper, app.GetSubspace(stakingtypes.ModuleName)),
upgrade.NewAppModule(app.UpgradeKeeper, app.AccountKeeper.AddressCodec()),
Expand Down Expand Up @@ -975,8 +983,8 @@ func (app *EthermintApp) AutoCliOpts() autocli.AppOptions {
}

// DefaultGenesis returns a default genesis from the registered AppModuleBasic's.
func (a *EthermintApp) DefaultGenesis() map[string]json.RawMessage {
return a.BasicModuleManager.DefaultGenesis(a.appCodec)
func (app *EthermintApp) DefaultGenesis() map[string]json.RawMessage {
return app.BasicModuleManager.DefaultGenesis(app.appCodec)
}

// GetKey returns the KVStoreKey for the provided store key.
Expand Down Expand Up @@ -1100,7 +1108,7 @@ func initParamsKeeper(appCodec codec.BinaryCodec, legacyAmino *codec.LegacyAmino
paramsKeeper.Subspace(ibctransfertypes.ModuleName)
paramsKeeper.Subspace(ibcexported.ModuleName)
// ethermint subspaces
paramsKeeper.Subspace(evmtypes.ModuleName).WithKeyTable(evmtypes.ParamKeyTable()) //nolint: staticcheck
paramsKeeper.Subspace(evmtypes.ModuleName).WithKeyTable(evmtypes.ParamKeyTable())

Check failure on line 1111 in app/app.go

View workflow job for this annotation

GitHub Actions / Run golangci-lint

File is not `gofumpt`-ed (gofumpt)
paramsKeeper.Subspace(feemarkettypes.ModuleName).WithKeyTable(feemarkettypes.ParamKeyTable())
return paramsKeeper
}
2 changes: 1 addition & 1 deletion app/upgrades.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ func (app *EthermintApp) RegisterUpgradeHandlers(
case ibctransfertypes.ModuleName:
keyTable = ibctransfertypes.ParamKeyTable()
case evmtypes.ModuleName:
keyTable = evmtypes.ParamKeyTable() //nolint:staticcheck
keyTable = evmtypes.ParamKeyTable()

Check failure on line 77 in app/upgrades.go

View workflow job for this annotation

GitHub Actions / Run golangci-lint

File is not `gofumpt`-ed (gofumpt)
case feemarkettypes.ModuleName:
keyTable = feemarkettypes.ParamKeyTable()
default:
Expand Down
3 changes: 1 addition & 2 deletions cmd/ethermintd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -266,8 +266,7 @@ func txCommand() *cobra.Command {
return cmd
}

type appCreator struct {
}
type appCreator struct{}

// newApp is an appCreator
func (a appCreator) newApp(logger log.Logger, db dbm.DB, traceStore io.Writer, appOpts servertypes.AppOptions) servertypes.Application {
Expand Down
4 changes: 2 additions & 2 deletions testutil/network/network.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ var lock = new(sync.Mutex)
type AppConstructor = func(val Validator) servertypes.Application

// NewAppConstructor returns a new simapp AppConstructor
func NewAppConstructor(encodingCfg params.EncodingConfig, chainID string) AppConstructor {
func NewAppConstructor(chainID string) AppConstructor {
return func(val Validator) servertypes.Application {
return app.NewEthermintApp(
val.Ctx.Logger,
Expand Down Expand Up @@ -158,7 +158,7 @@ func DefaultConfig() Config {
LegacyAmino: encCfg.Amino,
InterfaceRegistry: encCfg.InterfaceRegistry,
AccountRetriever: authtypes.AccountRetriever{},
AppConstructor: NewAppConstructor(encCfg, chainID),
AppConstructor: NewAppConstructor(chainID),
GenesisState: tempApp.DefaultGenesis(),
TimeoutCommit: 2 * time.Second,
ChainID: fmt.Sprintf("ethermint_%d-1", tmrand.Int63n(9999999999999)+1),
Expand Down

0 comments on commit 59e77ef

Please sign in to comment.