Skip to content

Commit

Permalink
fix FormatLogs memory (#75)
Browse files Browse the repository at this point in the history
  • Loading branch information
0xmountaintop authored Apr 2, 2022
1 parent 3d3c9d3 commit 06190d0
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions core/vm/logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -437,8 +437,7 @@ func FormatLogs(logs []StructLog) []types.StructLogRes {
if len(trace.Memory) != 0 {
memory := make([]string, 0, (len(trace.Memory)+31)/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, hexutil.Encode(bytes))
memory = append(memory, fmt.Sprintf("%x", trace.Memory[i:i+32]))
}
formatted[index].Memory = &memory
}
Expand Down

0 comments on commit 06190d0

Please sign in to comment.