diff options
author | obscuren <geffobscura@gmail.com> | 2015-06-10 18:23:49 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2015-06-10 18:23:49 +0800 |
commit | 38c61f6f2567e7943c9a16e2be0a2bfedb3a1fb3 (patch) | |
tree | 3877af08004f9dc2de00001257c9fe678de049d1 /tests | |
parent | ff5b3ef0877978699235d20b3caa9890b35ec6f8 (diff) | |
download | go-tangerine-38c61f6f2567e7943c9a16e2be0a2bfedb3a1fb3.tar go-tangerine-38c61f6f2567e7943c9a16e2be0a2bfedb3a1fb3.tar.gz go-tangerine-38c61f6f2567e7943c9a16e2be0a2bfedb3a1fb3.tar.bz2 go-tangerine-38c61f6f2567e7943c9a16e2be0a2bfedb3a1fb3.tar.lz go-tangerine-38c61f6f2567e7943c9a16e2be0a2bfedb3a1fb3.tar.xz go-tangerine-38c61f6f2567e7943c9a16e2be0a2bfedb3a1fb3.tar.zst go-tangerine-38c61f6f2567e7943c9a16e2be0a2bfedb3a1fb3.zip |
core, core/vm: added structure logging
This also reduces the time required spend in the VM
Diffstat (limited to 'tests')
-rw-r--r-- | tests/helper/vm.go | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/tests/helper/vm.go b/tests/helper/vm.go index 5f1a3e345..87b2e070d 100644 --- a/tests/helper/vm.go +++ b/tests/helper/vm.go @@ -27,9 +27,8 @@ type Env struct { difficulty *big.Int gasLimit *big.Int - logs state.Logs - vmTest bool + logs []vm.StructLog } func NewEnv(state *state.StateDB) *Env { @@ -38,6 +37,14 @@ func NewEnv(state *state.StateDB) *Env { } } +func (self *Env) StructLogs() []vm.StructLog { + return self.logs +} + +func (self *Env) AddStructLog(log vm.StructLog) { + self.logs = append(self.logs, log) +} + func NewEnvFromMap(state *state.StateDB, envValues map[string]string, exeValues map[string]string) *Env { env := NewEnv(state) |