eth/tracers,trie: remove unnecessary check (#30071)
This commit is contained in:
parent
9298d2db88
commit
269e80b07e
|
@ -204,12 +204,10 @@ func (s *supply) internalTxsHandler(call *supplyTxCallstack) {
|
||||||
s.delta.Burn.Misc.Add(s.delta.Burn.Misc, call.burn)
|
s.delta.Burn.Misc.Add(s.delta.Burn.Misc, call.burn)
|
||||||
}
|
}
|
||||||
|
|
||||||
if len(call.calls) > 0 {
|
// Recursively handle internal calls
|
||||||
// Recursively handle internal calls
|
for _, call := range call.calls {
|
||||||
for _, call := range call.calls {
|
callCopy := call
|
||||||
callCopy := call
|
s.internalTxsHandler(&callCopy)
|
||||||
s.internalTxsHandler(&callCopy)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -144,10 +144,8 @@ func (t *VerkleTrie) UpdateAccount(addr common.Address, acc *types.StateAccount)
|
||||||
|
|
||||||
// Encode balance in little-endian
|
// Encode balance in little-endian
|
||||||
bytes := acc.Balance.Bytes()
|
bytes := acc.Balance.Bytes()
|
||||||
if len(bytes) > 0 {
|
for i, b := range bytes {
|
||||||
for i, b := range bytes {
|
balance[len(bytes)-i-1] = b
|
||||||
balance[len(bytes)-i-1] = b
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
values[utils.BalanceLeafKey] = balance[:]
|
values[utils.BalanceLeafKey] = balance[:]
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue