From f19fe988a610521f1dea4c084ef79a1ac9ba03e7 Mon Sep 17 00:00:00 2001 From: Daniel Liu Date: Thu, 11 Sep 2025 17:10:36 +0800 Subject: [PATCH] eth/tracers/native: remove unnecessary check #30071 --- eth/tracers/native/call_flat.go | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/eth/tracers/native/call_flat.go b/eth/tracers/native/call_flat.go index 2dcd7b7f8624..43f5381fc972 100644 --- a/eth/tracers/native/call_flat.go +++ b/eth/tracers/native/call_flat.go @@ -264,16 +264,14 @@ func flatFromNested(input *callFrame, traceAddress []int, convertErrs bool, ctx } output = append(output, *frame) - if len(input.Calls) > 0 { - for i, childCall := range input.Calls { - childAddr := childTraceAddress(traceAddress, i) - childCallCopy := childCall - flat, err := flatFromNested(&childCallCopy, childAddr, convertErrs, ctx) - if err != nil { - return nil, err - } - output = append(output, flat...) + for i, childCall := range input.Calls { + childAddr := childTraceAddress(traceAddress, i) + childCallCopy := childCall + flat, err := flatFromNested(&childCallCopy, childAddr, convertErrs, ctx) + if err != nil { + return nil, err } + output = append(output, flat...) } return output, nil