aboutsummaryrefslogtreecommitdiffstats
path: root/ethchain/vm_test.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-03-21 02:50:53 +0800
committerobscuren <geffobscura@gmail.com>2014-03-21 02:50:53 +0800
commitc68ff9886bdd59294bc2bf0a6b8bf9b83645cc9a (patch)
treeb824abb6ae17acc68801d58440929e57751c569b /ethchain/vm_test.go
parentf21eb88ad1cf54b342187e8d3b55374a695cd524 (diff)
downloaddexon-c68ff9886bdd59294bc2bf0a6b8bf9b83645cc9a.tar
dexon-c68ff9886bdd59294bc2bf0a6b8bf9b83645cc9a.tar.gz
dexon-c68ff9886bdd59294bc2bf0a6b8bf9b83645cc9a.tar.bz2
dexon-c68ff9886bdd59294bc2bf0a6b8bf9b83645cc9a.tar.lz
dexon-c68ff9886bdd59294bc2bf0a6b8bf9b83645cc9a.tar.xz
dexon-c68ff9886bdd59294bc2bf0a6b8bf9b83645cc9a.tar.zst
dexon-c68ff9886bdd59294bc2bf0a6b8bf9b83645cc9a.zip
Fixed MSTORE and added some more commets
Diffstat (limited to 'ethchain/vm_test.go')
-rw-r--r--ethchain/vm_test.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/ethchain/vm_test.go b/ethchain/vm_test.go
index 4e72c9249..654ddb566 100644
--- a/ethchain/vm_test.go
+++ b/ethchain/vm_test.go
@@ -117,8 +117,10 @@ func TestRun3(t *testing.T) {
script := Compile([]string{
"PUSH", "300",
+ "PUSH", "0",
"MSTORE",
"PUSH", "300",
+ "PUSH", "31",
"MSTORE",
"PUSH", "62",
"PUSH", "0",
@@ -147,8 +149,7 @@ func TestRun3(t *testing.T) {
executer.Sign([]byte("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"))
callerClosure := NewClosure(executer, MakeContract(callerTx, state), state, big.NewInt(1000000000), new(big.Int))
- vm := &Vm{}
- vm.RunClosure(callerClosure, state, RuntimeVars{
+ vm := NewVm(state, RuntimeVars{
address: callerAddr,
blockNumber: 1,
sender: ethutil.FromHex("cd1722f3947def4cf144679da39c4c32bdc35681"),
@@ -159,4 +160,5 @@ func TestRun3(t *testing.T) {
txValue: big.NewInt(10000),
txData: nil,
})
+ callerClosure.Call(vm, nil)
}