From ccc6ae69840bea9647caf3a250980888c3cfe154 Mon Sep 17 00:00:00 2001 From: Aleksandr Bezobchuk Date: Wed, 24 Oct 2018 10:53:23 -0400 Subject: [PATCH] Fix linting errors --- types/tx.go | 5 ++++- types/utils.go | 2 +- x/evm/types/statedb.go | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/types/tx.go b/types/tx.go index 016cd83f..8a7abf28 100644 --- a/types/tx.go +++ b/types/tx.go @@ -241,7 +241,10 @@ func (tx Transaction) VerifySig(chainID *big.Int) (ethcmn.Address, error) { // Type implements the sdk.Msg interface. It returns the type of the // Transaction. -func (tx Transaction) Type() string { return TypeTxEthereum } +func (tx Transaction) Type() string { return TypeTxEthereum } + +// Route implements the sdk.Msg interface. It returns the route of the +// Transaction. func (tx Transaction) Route() string { return RouteTxEthereum } // ValidateBasic implements the sdk.Msg interface. It performs basic validation diff --git a/types/utils.go b/types/utils.go index 7135a583..ae4c7c09 100644 --- a/types/utils.go +++ b/types/utils.go @@ -25,7 +25,7 @@ func GenerateEthAddress() ethcmn.Address { // PrivKeyToEthAddress generates an Ethereum address given an ECDSA private key. func PrivKeyToEthAddress(p *ecdsa.PrivateKey) ethcmn.Address { - return ethcrypto.PubkeyToAddress(ecdsa.PublicKey(p.PublicKey)) + return ethcrypto.PubkeyToAddress(p.PublicKey) } // ValidateSigner attempts to validate a signer for a given slice of bytes over diff --git a/x/evm/types/statedb.go b/x/evm/types/statedb.go index bb367871..ceda0375 100644 --- a/x/evm/types/statedb.go +++ b/x/evm/types/statedb.go @@ -306,7 +306,7 @@ func (csdb *CommitStateDB) StorageTrie(addr ethcmn.Address) ethstate.Trie { } // ---------------------------------------------------------------------------- -// Persistance +// Persistence // ---------------------------------------------------------------------------- // Commit writes the state to the appropriate KVStores. For each state object