Skip to content

Commit 39fa775

Browse files
mask-ppholiman
authored andcommitted
Remove redundant pointer references
1 parent 6ae83f6 commit 39fa775

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

eth/tracers/logger/logger.go

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -425,17 +425,17 @@ type ExecutionResult struct {
425425
// StructLogRes stores a structured log emitted by the EVM while replaying a
426426
// transaction in debug mode
427427
type StructLogRes struct {
428-
Pc uint64 `json:"pc"`
429-
Op string `json:"op"`
430-
Gas uint64 `json:"gas"`
431-
GasCost uint64 `json:"gasCost"`
432-
Depth int `json:"depth"`
433-
Error string `json:"error,omitempty"`
434-
Stack *[]string `json:"stack,omitempty"`
435-
ReturnData string `json:"returnData,omitempty"`
436-
Memory *[]string `json:"memory,omitempty"`
437-
Storage *map[string]string `json:"storage,omitempty"`
438-
RefundCounter uint64 `json:"refund,omitempty"`
428+
Pc uint64 `json:"pc"`
429+
Op string `json:"op"`
430+
Gas uint64 `json:"gas"`
431+
GasCost uint64 `json:"gasCost"`
432+
Depth int `json:"depth"`
433+
Error string `json:"error,omitempty"`
434+
Stack []string `json:"stack,omitempty"`
435+
ReturnData string `json:"returnData,omitempty"`
436+
Memory []string `json:"memory,omitempty"`
437+
Storage map[string]string `json:"storage,omitempty"`
438+
RefundCounter uint64 `json:"refund,omitempty"`
439439
}
440440

441441
// formatLogs formats EVM returned structured logs for json output
@@ -456,7 +456,7 @@ func formatLogs(logs []StructLog) []StructLogRes {
456456
for i, stackValue := range trace.Stack {
457457
stack[i] = stackValue.Hex()
458458
}
459-
formatted[index].Stack = &stack
459+
formatted[index].Stack = stack
460460
}
461461
if trace.ReturnData != nil && len(trace.ReturnData) > 0 {
462462
formatted[index].ReturnData = hexutil.Bytes(trace.ReturnData).String()
@@ -466,14 +466,14 @@ func formatLogs(logs []StructLog) []StructLogRes {
466466
for i := 0; i+32 <= len(trace.Memory); i += 32 {
467467
memory = append(memory, fmt.Sprintf("%x", trace.Memory[i:i+32]))
468468
}
469-
formatted[index].Memory = &memory
469+
formatted[index].Memory = memory
470470
}
471471
if trace.Storage != nil {
472472
storage := make(map[string]string)
473473
for i, storageValue := range trace.Storage {
474474
storage[fmt.Sprintf("%x", i)] = fmt.Sprintf("%x", storageValue)
475475
}
476-
formatted[index].Storage = &storage
476+
formatted[index].Storage = storage
477477
}
478478
}
479479
return formatted

0 commit comments

Comments
 (0)