Skip to content

Commit 64d6c78

Browse files
authored
Merge pull request #24867 from holiman/no_preop_memexpand
core/vm: for tracing, do not report post-op memory
2 parents c9e324c + 97f308a commit 64d6c78

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
@@ -223,11 +223,15 @@ func (in *EVMInterpreter) Run(contract *Contract, input []byte, readOnly bool) (
223223
if err != nil || !contract.UseGas(dynamicCost) {
224224
return nil, ErrOutOfGas
225225
}
226+
// Do tracing before memory expansion
227+
if in.cfg.Debug {
228+
in.cfg.Tracer.CaptureState(pc, op, gasCopy, cost, callContext, in.returnData, in.evm.depth, err)
229+
logged = true
230+
}
226231
if memorySize > 0 {
227232
mem.Resize(memorySize)
228233
}
229-
}
230-
if in.cfg.Debug {
234+
} else if in.cfg.Debug {
231235
in.cfg.Tracer.CaptureState(pc, op, gasCopy, cost, callContext, in.returnData, in.evm.depth, err)
232236
logged = true
233237
}

0 commit comments

Comments
 (0)