Proper tests

This commit is contained in:
obscuren
2014-02-24 12:44:29 +01:00
parent b29c1eecd1
commit 88a9c62fcc
2 changed files with 24 additions and 406 deletions

View File

@ -22,8 +22,12 @@ func TestVm(t *testing.T) {
"1",
"PUSH",
"2",
"STOP",
})
ctrct := NewTransaction(ContractAddr, big.NewInt(200000000), script)
bm.ApplyTransactions(block, []*Transaction{ctrct})
tx := NewTransaction(ContractAddr, big.NewInt(200000000), script)
addr := tx.Hash()[12:]
bm.ApplyTransactions(block, []*Transaction{tx})
tx2 := NewTransaction(addr, big.NewInt(1e17), nil)
tx2.Sign([]byte("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"))
bm.ApplyTransactions(block, []*Transaction{tx2})
}