mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 10:22:23 +00:00
Remove redundant pointer references
This commit is contained in:
parent
6ae83f6735
commit
39fa775622
1 changed files with 14 additions and 14 deletions
|
|
@ -431,10 +431,10 @@ type StructLogRes struct {
|
|||
GasCost uint64 `json:"gasCost"`
|
||||
Depth int `json:"depth"`
|
||||
Error string `json:"error,omitempty"`
|
||||
Stack *[]string `json:"stack,omitempty"`
|
||||
Stack []string `json:"stack,omitempty"`
|
||||
ReturnData string `json:"returnData,omitempty"`
|
||||
Memory *[]string `json:"memory,omitempty"`
|
||||
Storage *map[string]string `json:"storage,omitempty"`
|
||||
Memory []string `json:"memory,omitempty"`
|
||||
Storage map[string]string `json:"storage,omitempty"`
|
||||
RefundCounter uint64 `json:"refund,omitempty"`
|
||||
}
|
||||
|
||||
|
|
@ -456,7 +456,7 @@ func formatLogs(logs []StructLog) []StructLogRes {
|
|||
for i, stackValue := range trace.Stack {
|
||||
stack[i] = stackValue.Hex()
|
||||
}
|
||||
formatted[index].Stack = &stack
|
||||
formatted[index].Stack = stack
|
||||
}
|
||||
if trace.ReturnData != nil && len(trace.ReturnData) > 0 {
|
||||
formatted[index].ReturnData = hexutil.Bytes(trace.ReturnData).String()
|
||||
|
|
@ -466,14 +466,14 @@ func formatLogs(logs []StructLog) []StructLogRes {
|
|||
for i := 0; i+32 <= len(trace.Memory); i += 32 {
|
||||
memory = append(memory, fmt.Sprintf("%x", trace.Memory[i:i+32]))
|
||||
}
|
||||
formatted[index].Memory = &memory
|
||||
formatted[index].Memory = memory
|
||||
}
|
||||
if trace.Storage != nil {
|
||||
storage := make(map[string]string)
|
||||
for i, storageValue := range trace.Storage {
|
||||
storage[fmt.Sprintf("%x", i)] = fmt.Sprintf("%x", storageValue)
|
||||
}
|
||||
formatted[index].Storage = &storage
|
||||
formatted[index].Storage = storage
|
||||
}
|
||||
}
|
||||
return formatted
|
||||
|
|
|
|||
Loading…
Reference in a new issue