Skip to content

Commit

Permalink
test: fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
dudong2 committed Nov 15, 2023
1 parent 5f71660 commit 5b35e32
Show file tree
Hide file tree
Showing 10 changed files with 10 additions and 25 deletions.
1 change: 0 additions & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ run:
linters:
enable:
- bodyclose
- depguard
- dogsled
- dupl
- errcheck
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
PACKAGES_NOSIMULATION=$(shell go list ./... | grep -v '/simulation')
PACKAGES_SIMTEST=$(shell go list ./... | grep '/simulation')
VERSION ?= $(shell echo $(shell git describe --tags `git rev-list --tags="v*" --max-count=1`) | sed 's/^v//')
TMVERSION := $(shell go list -m github.com/tendermint/tendermint | sed 's:.* ::')
TMVERSION := $(shell go list -m github.com/cometbft/cometbft | sed 's:.* ::')
COMMIT := $(shell git log -1 --format='%H')
LEDGER_ENABLED ?= true
BINDIR ?= $(GOPATH)/bin
Expand Down Expand Up @@ -72,7 +72,7 @@ ldflags = -X github.com/cosmos/cosmos-sdk/version.Name=ethermint \
-X github.com/cosmos/cosmos-sdk/version.Version=$(VERSION) \
-X github.com/cosmos/cosmos-sdk/version.Commit=$(COMMIT) \
-X "github.com/cosmos/cosmos-sdk/version.BuildTags=$(build_tags_comma_sep)" \
-X github.com/tendermint/tendermint/version.TMCoreSemVer=$(TMVERSION)
-X github.com/cometbft/cometbft/version.TMCoreSemVer=$(TMVERSION)

ifeq ($(ENABLE_ROCKSDB),true)
BUILD_TAGS += rocksdb_build
Expand Down
2 changes: 1 addition & 1 deletion app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -883,7 +883,7 @@ func initParamsKeeper(appCodec codec.BinaryCodec, legacyAmino *codec.LegacyAmino
paramsKeeper.Subspace(minttypes.ModuleName)
paramsKeeper.Subspace(distrtypes.ModuleName)
paramsKeeper.Subspace(slashingtypes.ModuleName)
paramsKeeper.Subspace(govtypes.ModuleName).WithKeyTable(govv1.ParamKeyTable())
paramsKeeper.Subspace(govtypes.ModuleName).WithKeyTable(govv1.ParamKeyTable()) //nolint: staticcheck
paramsKeeper.Subspace(crisistypes.ModuleName)
paramsKeeper.Subspace(ibctransfertypes.ModuleName)
paramsKeeper.Subspace(ibcexported.ModuleName)
Expand Down
2 changes: 1 addition & 1 deletion client/testnet.go
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ func initGenFiles(
var govGenState govv1.GenesisState
clientCtx.Codec.MustUnmarshalJSON(appGenState[govtypes.ModuleName], &govGenState)

govGenState.DepositParams.MinDeposit[0].Denom = coinDenom
govGenState.Params.MinDeposit[0].Denom = coinDenom
appGenState[govtypes.ModuleName] = clientCtx.Codec.MustMarshalJSON(&govGenState)

var mintGenState mintypes.GenesisState
Expand Down
3 changes: 2 additions & 1 deletion proto/buf.gen.gogo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ plugins:
opt: plugins=grpc,Mgoogle/protobuf/duration.proto=Mgoogle/protobuf/duration.proto=github.com/cosmos/gogoproto/types,Mgoogle/protobuf/struct.proto=github.com/cosmos/gogoproto/types,Mgoogle/protobuf/timestamp.proto=github.com/cosmos/gogoproto/types,Mgoogle/protobuf/wrappers.proto=github.com/cosmos/gogoproto/types,Mgoogle/protobuf/any.proto=github.com/cosmos/cosmos-sdk/codec/types,Mcosmos/orm/v1alpha1/orm.proto=github.com/cosmos/cosmos-sdk/api/cosmos/orm/v1alpha1
- name: grpc-gateway
out: .
opt: logtostderr=true,allow_colon_final_segments=true
opt: logtostderr=true,allow_colon_final_segments=true

3 changes: 2 additions & 1 deletion proto/buf.gen.swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ plugins:
- logtostderr=true
- fqn_for_swagger_name=true
- simple_operation_ids=true
strategy: all
strategy: all

2 changes: 1 addition & 1 deletion rpc/backend/chain_info.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ func (b *Backend) BaseFee(blockRes *tmrpctypes.ResultBlockResults) (*big.Int, er
for i := len(blockRes.BeginBlockEvents) - 1; i >= 0; i-- {
evt := blockRes.BeginBlockEvents[i]
if evt.Type == feemarkettypes.EventTypeFeeMarket && len(evt.Attributes) > 0 {
baseFee, err := strconv.ParseInt(string(evt.Attributes[0].Value), 10, 64)
baseFee, err := strconv.ParseInt(evt.Attributes[0].Value, 10, 64)
if err == nil {
return big.NewInt(baseFee), nil
}
Expand Down
2 changes: 1 addition & 1 deletion rpc/types/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ func BaseFeeFromEvents(events []abci.Event) *big.Int {

for _, attr := range event.Attributes {
if bytes.Equal([]byte(attr.Key), []byte(feemarkettypes.AttributeKeyBaseFee)) {
result, success := new(big.Int).SetString(string(attr.Value), 10)
result, success := new(big.Int).SetString(attr.Value, 10)
if success {
return result
}
Expand Down
8 changes: 0 additions & 8 deletions x/evm/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,9 +151,6 @@ func (am AppModule) RegisterServices(cfg module.Configurator) {
}
}

// QuerierRoute returns the evm module's querier route name.
func (AppModule) QuerierRoute() string { return types.RouterKey }

// BeginBlock returns the begin block for the evm module.
func (am AppModule) BeginBlock(ctx sdk.Context, req abci.RequestBeginBlock) {
am.keeper.BeginBlock(ctx, req)
Expand Down Expand Up @@ -185,11 +182,6 @@ func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.Raw
func (am AppModule) RegisterStoreDecoder(_ sdk.StoreDecoderRegistry) {
}

// ProposalContents doesn't return any content functions for governance proposals.
func (AppModule) ProposalContents(_ module.SimulationState) []simtypes.WeightedProposalContent {
return nil
}

// GenerateGenesisState creates a randomized GenState of the evm module.
func (AppModule) GenerateGenesisState(_ *module.SimulationState) {
}
Expand Down
8 changes: 0 additions & 8 deletions x/feemarket/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,9 +143,6 @@ func (am AppModule) RegisterServices(cfg module.Configurator) {
}
}

// QuerierRoute returns the fee market module's querier route name.
func (AppModule) QuerierRoute() string { return types.RouterKey }

// BeginBlock returns the begin block for the fee market module.
func (am AppModule) BeginBlock(ctx sdk.Context, req abci.RequestBeginBlock) {
am.keeper.BeginBlock(ctx, req)
Expand Down Expand Up @@ -178,11 +175,6 @@ func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.Raw
// RegisterStoreDecoder registers a decoder for fee market module's types
func (am AppModule) RegisterStoreDecoder(_ sdk.StoreDecoderRegistry) {}

// ProposalContents doesn't return any content functions for governance proposals.
func (AppModule) ProposalContents(_ module.SimulationState) []simtypes.WeightedProposalContent {
return nil
}

// GenerateGenesisState creates a randomized GenState of the fee market module.
func (AppModule) GenerateGenesisState(_ *module.SimulationState) {
}
Expand Down

0 comments on commit 5b35e32

Please sign in to comment.