Updated tests

This commit is contained in:
obscuren
2013-12-28 02:24:16 +01:00
parent 5a7eae705b
commit bb8afba20a
2 changed files with 27 additions and 15 deletions

View File

@ -9,7 +9,7 @@ func main() {
bm := NewBlockManager()
tx := NewTransaction(0x0, 20, []string{
tx := NewTransaction("\x00", 20, []string{
"SET 10 6",
"LD 10 10",
"LT 10 1 20",
@ -23,13 +23,18 @@ func main() {
"SET 255 15",
"JMP 255",
})
tx2 := NewTransaction(0x0, 20, []string{"SET 10 6", "LD 10 10"})
txData := tx.MarshalRlp()
copyTx := &Transaction{}
copyTx.UnmarshalRlp(txData)
tx2 := NewTransaction("\x00", 20, []string{"SET 10 6", "LD 10 10"})
blck := NewBlock([]*Transaction{tx2, tx})
bm.ProcessBlock( blck )
//fmt.Printf("rlp encoded Tx %q\n", tx.MarshalRlp())
fmt.Printf("block enc %q\n", blck.MarshalRlp())
fmt.Printf("block hash %q\n", blck.Hash())
//t := blck.MarshalRlp()
//blck.UnmarshalRlp(t)
}