aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/evm/runner.go
diff options
context:
space:
mode:
authorMartin Holst Swende <martin@swende.se>2017-08-23 19:37:18 +0800
committerPéter Szilágyi <peterke@gmail.com>2017-08-23 19:37:18 +0800
commit286ec5df40d3707a7a2c98d49c8d324372ed29c2 (patch)
tree1cb14e2519516edde4beba39d8524f5cab5b34ee /cmd/evm/runner.go
parentf7e39a772497f96253071da873d7d9923a3ed719 (diff)
downloaddexon-286ec5df40d3707a7a2c98d49c8d324372ed29c2.tar.gz
dexon-286ec5df40d3707a7a2c98d49c8d324372ed29c2.tar.zst
dexon-286ec5df40d3707a7a2c98d49c8d324372ed29c2.zip
cmd/evm, core/vm, internal/ethapi: Show error when exiting (#14985)
* cmd/evm, core/vm, internal/ethapi: Add 'err' to tracer interface CaptureEnd * cmd/evm: fix nullpointer when there is no error
Diffstat (limited to 'cmd/evm/runner.go')
-rw-r--r--cmd/evm/runner.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/cmd/evm/runner.go b/cmd/evm/runner.go
index ae5678110..96de0c76a 100644
--- a/cmd/evm/runner.go
+++ b/cmd/evm/runner.go
@@ -234,13 +234,13 @@ Gas used: %d
`, execTime, mem.HeapObjects, mem.Alloc, mem.TotalAlloc, mem.NumGC, initialGas-leftOverGas)
}
if tracer != nil {
- tracer.CaptureEnd(ret, initialGas-leftOverGas, execTime)
+ tracer.CaptureEnd(ret, initialGas-leftOverGas, execTime, err)
} else {
fmt.Printf("0x%x\n", ret)
+ if err != nil {
+ fmt.Printf(" error: %v\n", err)
+ }
}
- if err != nil {
- fmt.Printf(" error: %v\n", err)
- }
return nil
}