mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-27 07:06:42 +00:00
fix FormatLogs memory (#75)
This commit is contained in:
parent
3d3c9d3edf
commit
06190d0642
1 changed files with 1 additions and 2 deletions
|
|
@ -437,8 +437,7 @@ func FormatLogs(logs []StructLog) []types.StructLogRes {
|
||||||
if len(trace.Memory) != 0 {
|
if len(trace.Memory) != 0 {
|
||||||
memory := make([]string, 0, (len(trace.Memory)+31)/32)
|
memory := make([]string, 0, (len(trace.Memory)+31)/32)
|
||||||
for i := 0; i+32 <= len(trace.Memory); i += 32 {
|
for i := 0; i+32 <= len(trace.Memory); i += 32 {
|
||||||
bytes := new(big.Int).SetBytes(trace.Memory[i : i+32]).Bytes()
|
memory = append(memory, fmt.Sprintf("%x", trace.Memory[i:i+32]))
|
||||||
memory = append(memory, hexutil.Encode(bytes))
|
|
||||||
}
|
}
|
||||||
formatted[index].Memory = &memory
|
formatted[index].Memory = &memory
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue