Skip to content

Commit 1e4b358

Browse files
holimanjagdeep sidhu
authored andcommitted
core/vm: for tracing, do not report post-op memory
1 parent ea8b44c commit 1e4b358

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

core/vm/interpreter.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,11 +226,15 @@ func (in *EVMInterpreter) Run(contract *Contract, input []byte, readOnly bool) (
226226
if err != nil || !contract.UseGas(dynamicCost) {
227227
return nil, ErrOutOfGas
228228
}
229+
// Do tracing before memory expansion
230+
if in.cfg.Debug {
231+
in.cfg.Tracer.CaptureState(pc, op, gasCopy, cost, callContext, in.returnData, in.evm.depth, err)
232+
logged = true
233+
}
229234
if memorySize > 0 {
230235
mem.Resize(memorySize)
231236
}
232-
}
233-
if in.cfg.Debug {
237+
} else if in.cfg.Debug {
234238
in.cfg.Tracer.CaptureState(pc, op, gasCopy, cost, callContext, in.returnData, in.evm.depth, err)
235239
logged = true
236240
}

0 commit comments

Comments
 (0)