Skip to content

Commit

Permalink
Merge pull request #24867 from holiman/no_preop_memexpand
Browse files Browse the repository at this point in the history
core/vm: for tracing, do not report post-op memory
  • Loading branch information
karalabe committed May 24, 2022
2 parents c9e324c + 97f308a commit 64d6c78
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions core/vm/interpreter.go
Original file line number Diff line number Diff line change
Expand Up @@ -223,11 +223,15 @@ func (in *EVMInterpreter) Run(contract *Contract, input []byte, readOnly bool) (
if err != nil || !contract.UseGas(dynamicCost) {
return nil, ErrOutOfGas
}
// Do tracing before memory expansion
if in.cfg.Debug {
in.cfg.Tracer.CaptureState(pc, op, gasCopy, cost, callContext, in.returnData, in.evm.depth, err)
logged = true
}
if memorySize > 0 {
mem.Resize(memorySize)
}
}
if in.cfg.Debug {
} else if in.cfg.Debug {
in.cfg.Tracer.CaptureState(pc, op, gasCopy, cost, callContext, in.returnData, in.evm.depth, err)
logged = true
}
Expand Down

0 comments on commit 64d6c78

Please sign in to comment.