mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-05-24 08:49:29 +00:00
eth/tracers/native: add empty check
This commit is contained in:
parent
d4027f3d46
commit
a2b799e5a2
1 changed files with 7 additions and 2 deletions
|
|
@ -187,9 +187,14 @@ func (t *flatCallTracer) OnExit(depth int, output []byte, gasUsed uint64, err er
|
||||||
if t.config.IncludePrecompiles {
|
if t.config.IncludePrecompiles {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
var (
|
|
||||||
// call has been nested in parent
|
// call has been nested in parent
|
||||||
parent = t.tracer.callstack[len(t.tracer.callstack)-1]
|
parentStack := t.tracer.callstack[len(t.tracer.callstack)-1]
|
||||||
|
if len(parentStack.Calls) == 0 {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
var (
|
||||||
|
parent = &parentStack
|
||||||
call = parent.Calls[len(parent.Calls)-1]
|
call = parent.Calls[len(parent.Calls)-1]
|
||||||
typ = call.Type
|
typ = call.Type
|
||||||
to = call.To
|
to = call.To
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue