This commit is contained in:
0xmuralik 2022-10-17 17:14:21 +05:30
parent e0df2b6749
commit d965f6fbb9
4 changed files with 8 additions and 7 deletions

View File

@ -125,7 +125,7 @@ func (avd EthAccountVerificationDecorator) AnteHandle(
// check whether the sender address is EOA
fromAddr := common.BytesToAddress(from)
acct := avd.evmKeeper.GetAccount(ctx, fromAddr)
acct := avd.evmKeeper.GetAccount(ctx, fromAddr) //nolint: all
if acct == nil {
acc := avd.ak.NewAccountWithAddress(ctx, from)

View File

@ -1,3 +1,4 @@
//nolint: all
package app
import (

View File

@ -11,10 +11,10 @@ import (
)
var (
_ authtypes.AccountI = (*EthAccount)(nil)
_ EthAccountI = (*EthAccount)(nil)
_ authtypes.GenesisAccount = (*EthAccount)(nil)
_ codectypes.UnpackInterfacesMessage = (*EthAccount)(nil)
_ authtypes.AccountI = (*EthAccount)(nil) //nolint: all
_ EthAccountI = (*EthAccount)(nil) //nolint: all
_ authtypes.GenesisAccount = (*EthAccount)(nil) //nolint: all
_ codectypes.UnpackInterfacesMessage = (*EthAccount)(nil) //nolint: all
)
var emptyCodeHash = crypto.Keccak256(nil)

View File

@ -227,7 +227,7 @@ func (k Keeper) GetAccountStorage(ctx sdk.Context, address common.Address) types
// SetHooks sets the hooks for the EVM module
// It should be called only once during initialization, it panic if called more than once.
func (k *Keeper) SetHooks(eh types.EvmHooks) *Keeper {
if k.hooks != nil {
if k.hooks != types.EvmHooks(nil) {
panic("cannot set evm hooks twice")
}
@ -237,7 +237,7 @@ func (k *Keeper) SetHooks(eh types.EvmHooks) *Keeper {
// PostTxProcessing delegate the call to the hooks. If no hook has been registered, this function returns with a `nil` error
func (k *Keeper) PostTxProcessing(ctx sdk.Context, msg core.Message, receipt *ethtypes.Receipt) error {
if k.hooks == nil {
if k.hooks == types.EvmHooks(nil) {
return nil
}
return k.hooks.PostTxProcessing(ctx, msg, receipt)