aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2016-02-03 16:34:52 +0800
committerPéter Szilágyi <peterke@gmail.com>2016-02-03 16:34:52 +0800
commita8fd0de0d344ce3828901fa47204a68971184684 (patch)
tree9e684d86355e0418f3b5c055bbf3c2e22437a2c4 /core
parent2e2f093ec2315da670f3300954975d9136fe76af (diff)
parent15780ead07e650e829a5756857fdbb4e2871356a (diff)
downloaddexon-a8fd0de0d344ce3828901fa47204a68971184684.tar.gz
dexon-a8fd0de0d344ce3828901fa47204a68971184684.tar.zst
dexon-a8fd0de0d344ce3828901fa47204a68971184684.zip
Merge pull request #2156 from ppratscher/add_replay_tx
core/vm, rpc/api: added debug_replayTransaction RPC call
Diffstat (limited to 'core')
-rw-r--r--core/vm/common.go2
-rw-r--r--core/vm/vm.go2
2 files changed, 3 insertions, 1 deletions
diff --git a/core/vm/common.go b/core/vm/common.go
index 2d1aa9332..395ed0471 100644
--- a/core/vm/common.go
+++ b/core/vm/common.go
@@ -28,6 +28,8 @@ import (
// Global Debug flag indicating Debug VM (full logging)
var Debug bool
+var GenerateStructLogs bool = false
+
// Type is the VM type accepted by **NewVm**
type Type byte
diff --git a/core/vm/vm.go b/core/vm/vm.go
index 8e07aaa89..0c6bbcd42 100644
--- a/core/vm/vm.go
+++ b/core/vm/vm.go
@@ -367,7 +367,7 @@ func (self *Vm) RunPrecompiled(p *PrecompiledAccount, input []byte, contract *Co
// log emits a log event to the environment for each opcode encountered. This is not to be confused with the
// LOG* opcode.
func (self *Vm) log(pc uint64, op OpCode, gas, cost *big.Int, memory *Memory, stack *stack, contract *Contract, err error) {
- if Debug {
+ if Debug || GenerateStructLogs {
mem := make([]byte, len(memory.Data()))
copy(mem, memory.Data())