diff --git a/.golangci.yml b/.golangci.yml index 51218865..e5e9ae6e 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -28,7 +28,7 @@ linters: - staticcheck - structcheck - stylecheck - - typecheck + # - typecheck #TODO: enable - unconvert - unparam - unused diff --git a/CHANGELOG.md b/CHANGELOG.md index b39a9c52..b7feaf46 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -37,6 +37,10 @@ Ref: https://keepachangelog.com/en/1.0.0/ ## Unreleased +### Improvements + +* (evm) [tharsis#826](https://github.com/tharsis/ethermint/issues/826) Improve allocation of bytes of `tx.To` address. + ## [v0.9.0] - 2021-12-01 ### State Machine Breaking diff --git a/gometalinter.json b/gometalinter.json deleted file mode 100644 index 78a33ed7..00000000 --- a/gometalinter.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "Linters": { - "vet": "go tool vet -composites=false :PATH:LINE:MESSAGE" - }, - "Enable": [ - "golint", - "vet", - "ineffassign", - "unparam", - "unconvert", - "misspell" - ], - "Deadline": "500s", - "Vendor": true, - "Cyclo": 11 -} \ No newline at end of file diff --git a/server/start.go b/server/start.go index 3ae3c61e..80f7b3bf 100644 --- a/server/start.go +++ b/server/start.go @@ -41,8 +41,6 @@ import ( storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" - ethlog "github.com/ethereum/go-ethereum/log" - "github.com/tharsis/ethermint/log" ethdebug "github.com/tharsis/ethermint/rpc/ethereum/namespaces/debug" "github.com/tharsis/ethermint/server/config" srvflags "github.com/tharsis/ethermint/server/flags" @@ -405,12 +403,11 @@ func startInProcess(ctx *server.Context, clientCtx client.Context, appCreator ty } } - ethlog.Root().SetHandler(log.NewHandler(logger)) - var ( httpSrv *http.Server httpSrvDone chan struct{} ) + if config.JSONRPC.Enable { genDoc, err := genDocProvider() if err != nil { diff --git a/x/evm/keeper/msg_server.go b/x/evm/keeper/msg_server.go index c12a877c..df132a4f 100644 --- a/x/evm/keeper/msg_server.go +++ b/x/evm/keeper/msg_server.go @@ -44,8 +44,8 @@ func (k *Keeper) EthereumTx(goCtx context.Context, msg *types.MsgEthereumTx) (*t attrs = append(attrs, sdk.NewAttribute(types.AttributeKeyTxHash, hash.String())) } - if tx.To() != nil { - attrs = append(attrs, sdk.NewAttribute(types.AttributeKeyRecipient, tx.To().Hex())) + if to := tx.To(); to != nil { + attrs = append(attrs, sdk.NewAttribute(types.AttributeKeyRecipient, to.Hex())) } if response.Failed() {