aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/evm/main.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-06-11 03:09:12 +0800
committerobscuren <geffobscura@gmail.com>2015-06-11 03:09:12 +0800
commit5cfae0536f8499634c2fa2eba9a71fec1c0d417b (patch)
treec445f357ead048c9c440db0912e1e623ad6f199c /cmd/evm/main.go
parente7627623b96d06f4963ae424d2cb41cf9ba86e72 (diff)
downloaddexon-5cfae0536f8499634c2fa2eba9a71fec1c0d417b.tar
dexon-5cfae0536f8499634c2fa2eba9a71fec1c0d417b.tar.gz
dexon-5cfae0536f8499634c2fa2eba9a71fec1c0d417b.tar.bz2
dexon-5cfae0536f8499634c2fa2eba9a71fec1c0d417b.tar.lz
dexon-5cfae0536f8499634c2fa2eba9a71fec1c0d417b.tar.xz
dexon-5cfae0536f8499634c2fa2eba9a71fec1c0d417b.tar.zst
dexon-5cfae0536f8499634c2fa2eba9a71fec1c0d417b.zip
cmd/evm: print trace when running programs
Diffstat (limited to 'cmd/evm/main.go')
-rw-r--r--cmd/evm/main.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/cmd/evm/main.go b/cmd/evm/main.go
index 599721c89..7c9d27fac 100644
--- a/cmd/evm/main.go
+++ b/cmd/evm/main.go
@@ -59,6 +59,7 @@ func main() {
logger.AddLogSystem(logger.NewStdLogSystem(os.Stdout, log.LstdFlags, logger.LogLevel(*loglevel)))
+ vm.Debug = true
db, _ := ethdb.NewMemDatabase()
statedb := state.New(common.Hash{}, db)
sender := statedb.CreateAccount(common.StringToAddress("sender"))
@@ -80,6 +81,8 @@ func main() {
fmt.Println(string(statedb.Dump()))
}
+ vm.StdErrFormat(vmenv.StructLogs())
+
var mem runtime.MemStats
runtime.ReadMemStats(&mem)
fmt.Printf("vm took %v\n", time.Since(tstart))