aboutsummaryrefslogtreecommitdiffstats
path: root/core/vm/logger.go
diff options
context:
space:
mode:
Diffstat (limited to 'core/vm/logger.go')
-rw-r--r--core/vm/logger.go20
1 files changed, 2 insertions, 18 deletions
diff --git a/core/vm/logger.go b/core/vm/logger.go
index 102a215c7..ccdf21a4b 100644
--- a/core/vm/logger.go
+++ b/core/vm/logger.go
@@ -17,10 +17,10 @@
package vm
import (
+ "encoding/hex"
"fmt"
"math/big"
"os"
- "unicode"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/common/math"
@@ -184,24 +184,8 @@ func StdErrFormat(logs []StructLog) {
fmt.Fprintf(os.Stderr, "%04d: %x\n", len(log.Stack)-i-1, math.PaddedBigBytes(log.Stack[i], 32))
}
- const maxMem = 10
- addr := 0
fmt.Fprintln(os.Stderr, "MEM =", len(log.Memory))
- for i := 0; i+16 <= len(log.Memory) && addr < maxMem; i += 16 {
- data := log.Memory[i : i+16]
- str := fmt.Sprintf("%04d: % x ", addr*16, data)
- for _, r := range data {
- if r == 0 {
- str += "."
- } else if unicode.IsPrint(rune(r)) {
- str += fmt.Sprintf("%s", string(r))
- } else {
- str += "?"
- }
- }
- addr++
- fmt.Fprintln(os.Stderr, str)
- }
+ fmt.Fprintln(os.Stderr, hex.Dump(log.Memory))
fmt.Fprintln(os.Stderr, "STORAGE =", len(log.Storage))
for h, item := range log.Storage {