aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-03-28 06:17:23 +0800
committerobscuren <geffobscura@gmail.com>2014-03-28 06:17:23 +0800
commit75e6406c1f1034dbf96aca28193d7e1e0653db50 (patch)
tree760cf5a56c25809a8b205321481bb3fa06c67d0d
parent3c3431d111ae8ba7f03349f93c9b191fcdf92254 (diff)
downloaddexon-75e6406c1f1034dbf96aca28193d7e1e0653db50.tar.gz
dexon-75e6406c1f1034dbf96aca28193d7e1e0653db50.tar.zst
dexon-75e6406c1f1034dbf96aca28193d7e1e0653db50.zip
Fixed tests
-rw-r--r--ethchain/vm_test.go16
1 files changed, 8 insertions, 8 deletions
diff --git a/ethchain/vm_test.go b/ethchain/vm_test.go
index 308a65432..5acc47659 100644
--- a/ethchain/vm_test.go
+++ b/ethchain/vm_test.go
@@ -29,7 +29,7 @@ func TestRun3(t *testing.T) {
"PUSH", "0",
"RETURN",
})
- tx := NewTransaction(ContractAddr, ethutil.Big("100000000000000000000000000000000000000000000000000"), script)
+ tx := NewContractCreationTx(ethutil.Big("0"), ethutil.Big("1000"), script)
addr := tx.Hash()[12:]
contract := MakeContract(tx, state)
state.UpdateContract(contract)
@@ -51,7 +51,7 @@ func TestRun3(t *testing.T) {
"PUSH", 0,
"RETURN",
)
- callerTx := NewTransaction(ContractAddr, ethutil.Big("100000000000000000000000000000000000000000000000000"), callerScript)
+ callerTx := NewContractCreationTx(ethutil.Big("0"), ethutil.Big("1000"), callerScript)
// Contract addr as test address
account := NewAccount(ContractAddr, big.NewInt(10000000))
@@ -84,20 +84,20 @@ func TestRun4(t *testing.T) {
mutan.NewCompiler().Compile(strings.NewReader(`
a = 1337
c = 1
-[0] = 50
-d = [0]
+store[0] = 50
+d = store[0]
`))
- asm := mutan.NewCompiler().Compile(strings.NewReader(`
+ asm, _ := mutan.NewCompiler().Compile(strings.NewReader(`
a = 3 + 3
- [1000] = a
- [1000]
+ stotre[1000] = a
+ store[1000]
`))
asm = append(asm, "LOG")
fmt.Println(asm)
callerScript := ethutil.Assemble(asm...)
- callerTx := NewTransaction(ContractAddr, ethutil.Big("100000000000000000000000000000000000000000000000000"), callerScript)
+ callerTx := NewContractCreationTx(ethutil.Big("0"), ethutil.Big("1000"), callerScript)
// Contract addr as test address
account := NewAccount(ContractAddr, big.NewInt(10000000))