This commit is contained in:
0xmuralik
2022-10-17 11:55:19 +05:30
parent d35d3c0716
commit ec3e8f7ce3
5 changed files with 14 additions and 12 deletions
+1 -1
View File
@@ -215,7 +215,7 @@ func (k *Keeper) ApplyTransaction(ctx sdk.Context, tx *ethtypes.Transaction) (*t
// snapshot to contain the tx processing and post processing in same scope
var commit func()
tmpCtx := ctx
if k.hooks != nil {
if k.hooks != types.EvmHooks(nil) {
// Create a cache context to revert state when tx hooks fails,
// the cache context is only committed when both tx and hooks executed successfully.
// Didn't use `Snapshot` because the context stack has exponential complexity on certain operations,