aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-06-04 22:05:28 +0800
committerobscuren <geffobscura@gmail.com>2015-06-05 01:48:23 +0800
commit246db4250bbb5dd317a0d4bb589807d3479bb334 (patch)
tree8f4aad6e7961b3fb40be5741f562fb0e21d3c70e /tests
parent45152dead5c6bc144f8ed51ed85d5ef64f783735 (diff)
downloaddexon-246db4250bbb5dd317a0d4bb589807d3479bb334.tar.gz
dexon-246db4250bbb5dd317a0d4bb589807d3479bb334.tar.zst
dexon-246db4250bbb5dd317a0d4bb589807d3479bb334.zip
tests: use state logs instead own kept logs
Diffstat (limited to 'tests')
-rw-r--r--tests/helper/vm.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/helper/vm.go b/tests/helper/vm.go
index 6a1b9a0f1..5f1a3e345 100644
--- a/tests/helper/vm.go
+++ b/tests/helper/vm.go
@@ -67,7 +67,7 @@ func (self *Env) GetHash(n uint64) common.Hash {
return common.BytesToHash(crypto.Sha3([]byte(big.NewInt(int64(n)).String())))
}
func (self *Env) AddLog(log *state.Log) {
- self.logs = append(self.logs, log)
+ self.state.AddLog(log)
}
func (self *Env) Depth() int { return self.depth }
func (self *Env) SetDepth(i int) { self.depth = i }
@@ -153,7 +153,7 @@ func RunVm(state *state.StateDB, env, exec map[string]string) ([]byte, state.Log
vmenv.initial = true
ret, err := vmenv.Call(caller, to, data, gas, price, value)
- return ret, vmenv.logs, vmenv.Gas, err
+ return ret, vmenv.state.Logs(), vmenv.Gas, err
}
func RunState(statedb *state.StateDB, env, tx map[string]string) ([]byte, state.Logs, *big.Int, error) {
@@ -188,7 +188,7 @@ func RunState(statedb *state.StateDB, env, tx map[string]string) ([]byte, state.
}
statedb.Update()
- return ret, vmenv.logs, vmenv.Gas, err
+ return ret, vmenv.state.Logs(), vmenv.Gas, err
}
type Message struct {