Skip to content

Commit

Permalink
core/vm: for tracing, do not report post-op memory
Browse files Browse the repository at this point in the history
  • Loading branch information
holiman authored and cp-wjhan committed Dec 1, 2022
1 parent db2660c commit 36631fc
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 36631fc

Please sign in to comment.