mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-11 14:33:52 +00:00
fix bug about get the trace of opcode (#67)
This commit is contained in:
parent
9f1d8552e4
commit
fccb5bf6ec
1 changed files with 7 additions and 7 deletions
|
|
@ -216,15 +216,15 @@ func (l *StructLogger) CaptureState(pc uint64, op OpCode, gas, cost uint64, scop
|
||||||
copy(rdata, rData)
|
copy(rdata, rData)
|
||||||
}
|
}
|
||||||
execFuncList, ok := OpcodeExecs[op]
|
execFuncList, ok := OpcodeExecs[op]
|
||||||
if !ok {
|
if ok {
|
||||||
return
|
// execute trace func list.
|
||||||
}
|
for _, exec := range execFuncList {
|
||||||
// execute trace func list.
|
if err = exec(l, scope, extraData); err != nil {
|
||||||
for _, exec := range execFuncList {
|
log.Error("Failed to trace data", "opcode", op.String(), "err", err)
|
||||||
if err = exec(l, scope, extraData); err != nil {
|
}
|
||||||
log.Error("Failed to trace data", "opcode", op.String(), "err", err)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// create a new snapshot of the EVM.
|
// create a new snapshot of the EVM.
|
||||||
structLog := StructLog{pc, op, gas, cost, mem, memory.Len(), stck, rdata, storage, depth, l.env.StateDB.GetRefund(), extraData, err}
|
structLog := StructLog{pc, op, gas, cost, mem, memory.Len(), stck, rdata, storage, depth, l.env.StateDB.GetRefund(), extraData, err}
|
||||||
l.logs = append(l.logs, structLog)
|
l.logs = append(l.logs, structLog)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue