diff options
author | obscuren <geffobscura@gmail.com> | 2014-03-28 06:17:23 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2014-03-28 06:17:23 +0800 |
commit | 75e6406c1f1034dbf96aca28193d7e1e0653db50 (patch) | |
tree | 760cf5a56c25809a8b205321481bb3fa06c67d0d /ethchain | |
parent | 3c3431d111ae8ba7f03349f93c9b191fcdf92254 (diff) | |
download | go-tangerine-75e6406c1f1034dbf96aca28193d7e1e0653db50.tar.gz go-tangerine-75e6406c1f1034dbf96aca28193d7e1e0653db50.tar.zst go-tangerine-75e6406c1f1034dbf96aca28193d7e1e0653db50.zip |
Fixed tests
Diffstat (limited to 'ethchain')
-rw-r--r-- | ethchain/vm_test.go | 16 |
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)) |