diff options
author | obscuren <geffobscura@gmail.com> | 2014-03-21 06:17:53 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2014-03-21 06:17:53 +0800 |
commit | 7705b23f248156878d00c301fbbadafedaf7e3d2 (patch) | |
tree | 11f3373c598106b9f6f689370079a9b220a42e34 /ethchain/vm_test.go | |
parent | f3d27bf5d878120346f8cdd0744e7f1f8e1ee631 (diff) | |
download | go-tangerine-7705b23f248156878d00c301fbbadafedaf7e3d2.tar go-tangerine-7705b23f248156878d00c301fbbadafedaf7e3d2.tar.gz go-tangerine-7705b23f248156878d00c301fbbadafedaf7e3d2.tar.bz2 go-tangerine-7705b23f248156878d00c301fbbadafedaf7e3d2.tar.lz go-tangerine-7705b23f248156878d00c301fbbadafedaf7e3d2.tar.xz go-tangerine-7705b23f248156878d00c301fbbadafedaf7e3d2.tar.zst go-tangerine-7705b23f248156878d00c301fbbadafedaf7e3d2.zip |
Removed caller from tx and added "callership" to account.
Transactions can no longer serve as callers. Accounts are now the
initial callee of closures. Transactions now serve as transport to call
closures.
Diffstat (limited to 'ethchain/vm_test.go')
-rw-r--r-- | ethchain/vm_test.go | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/ethchain/vm_test.go b/ethchain/vm_test.go index 654ddb566..30c8a110e 100644 --- a/ethchain/vm_test.go +++ b/ethchain/vm_test.go @@ -133,10 +133,10 @@ func TestRun3(t *testing.T) { state.UpdateContract(addr, contract) callerScript := Compile([]string{ - "PUSH", "62", // REND - "PUSH", "0", // RSTART - "PUSH", "22", // MEND - "PUSH", "15", // MSTART + "PUSH", "62", // ret size + "PUSH", "0", // ret offset + "PUSH", "32", // arg size + "PUSH", "63", // arg offset "PUSH", "1000", /// Gas "PUSH", "0", /// value "PUSH", string(addr), // Sender @@ -144,10 +144,9 @@ func TestRun3(t *testing.T) { }) callerTx := NewTransaction(ContractAddr, ethutil.Big("100000000000000000000000000000000000000000000000000"), callerScript) callerAddr := callerTx.Hash()[12:] - executer := NewTransaction(ContractAddr, ethutil.Big("10000"), nil) - executer.Sign([]byte("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")) - callerClosure := NewClosure(executer, MakeContract(callerTx, state), state, big.NewInt(1000000000), new(big.Int)) + account := NewAccount(ContractAddr, big.NewInt(10000000)) + callerClosure := NewClosure(account, MakeContract(callerTx, state), state, big.NewInt(1000000000), new(big.Int)) vm := NewVm(state, RuntimeVars{ address: callerAddr, |