eth/tracers/native: remove unnecessary check #30071 (#1477)

This commit is contained in:
Daniel Liu 2025-09-13 10:40:18 +08:00 committed by GitHub
parent fd040ec0d7
commit a00d95bf1a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -274,16 +274,14 @@ func flatFromNested(input *callFrame, traceAddress []int, convertErrs bool, ctx
} }
output = append(output, *frame) output = append(output, *frame)
if len(input.Calls) > 0 { for i, childCall := range input.Calls {
for i, childCall := range input.Calls { childAddr := childTraceAddress(traceAddress, i)
childAddr := childTraceAddress(traceAddress, i) childCallCopy := childCall
childCallCopy := childCall flat, err := flatFromNested(&childCallCopy, childAddr, convertErrs, ctx)
flat, err := flatFromNested(&childCallCopy, childAddr, convertErrs, ctx) if err != nil {
if err != nil { return nil, err
return nil, err
}
output = append(output, flat...)
} }
output = append(output, flat...)
} }
return output, nil return output, nil