From 3ebcf92b423e67b58a72a3fc126449e4e97bc4c8 Mon Sep 17 00:00:00 2001 From: dm4 Date: Fri, 6 Apr 2018 18:43:36 +0800 Subject: cmd/evm: print vm output when debug flag is on (#16326) --- cmd/evm/runner.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'cmd/evm/runner.go') diff --git a/cmd/evm/runner.go b/cmd/evm/runner.go index 8a7399840..c13e9fb33 100644 --- a/cmd/evm/runner.go +++ b/cmd/evm/runner.go @@ -76,6 +76,7 @@ func runCmd(ctx *cli.Context) error { logconfig := &vm.LogConfig{ DisableMemory: ctx.GlobalBool(DisableMemoryFlag.Name), DisableStack: ctx.GlobalBool(DisableStackFlag.Name), + Debug: ctx.GlobalBool(DebugFlag.Name), } var ( @@ -234,9 +235,7 @@ Gas used: %d `, execTime, mem.HeapObjects, mem.Alloc, mem.TotalAlloc, mem.NumGC, initialGas-leftOverGas) } - if tracer != nil { - tracer.CaptureEnd(ret, initialGas-leftOverGas, execTime, err) - } else { + if tracer == nil { fmt.Printf("0x%x\n", ret) if err != nil { fmt.Printf(" error: %v\n", err) -- cgit v1.2.3