From 584c4c04336c2b11156d53fb6487beeceea139dc Mon Sep 17 00:00:00 2001 From: Sina Mahmoodi Date: Tue, 14 Feb 2023 14:37:36 +0300 Subject: [PATCH] minor styling --- eth/tracers/native/call_flat.go | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/eth/tracers/native/call_flat.go b/eth/tracers/native/call_flat.go index 0ee46253c5dc..3473a9fa8046 100644 --- a/eth/tracers/native/call_flat.go +++ b/eth/tracers/native/call_flat.go @@ -191,19 +191,19 @@ func (t *flatCallTracer) CaptureExit(output []byte, gasUsed uint64, err error) { // Parity traces don't include CALL/STATICCALLs to precompiles. // By default we remove them from the callstack. - excludePrecompileCalls := !t.config.IncludePrecompiles - if excludePrecompileCalls { - var ( - // call has been nested in parent - parent = t.tracer.callstack[len(t.tracer.callstack)-1] - call = parent.Calls[len(parent.Calls)-1] - typ = call.Type - to = call.To - ) - if typ == vm.CALL || typ == vm.STATICCALL { - if t.isPrecompiled(to) { - t.tracer.callstack[len(t.tracer.callstack)-1].Calls = parent.Calls[:len(parent.Calls)-1] - } + if t.config.IncludePrecompiles { + return + } + var ( + // call has been nested in parent + parent = t.tracer.callstack[len(t.tracer.callstack)-1] + call = parent.Calls[len(parent.Calls)-1] + typ = call.Type + to = call.To + ) + if typ == vm.CALL || typ == vm.STATICCALL { + if t.isPrecompiled(to) { + t.tracer.callstack[len(t.tracer.callstack)-1].Calls = parent.Calls[:len(parent.Calls)-1] } } }