eth/tracers: improve tracing performance (#23016)

Improves the performance of debug.traceTransaction
This commit is contained in:
Martin Holst Swende
2021-07-01 09:15:04 +02:00
committed by GitHub
parent bbbeb7d8ba
commit f5f906dd0d
5 changed files with 105 additions and 34 deletions

View File

@ -1117,7 +1117,7 @@ func FormatLogs(logs []vm.StructLog) []StructLogRes {
if trace.Stack != nil {
stack := make([]string, len(trace.Stack))
for i, stackValue := range trace.Stack {
stack[i] = fmt.Sprintf("%x", math.PaddedBigBytes(stackValue, 32))
stack[i] = stackValue.Hex()
}
formatted[index].Stack = &stack
}