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
+2 -2
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)