2014-01-01 13:36:48 +01:00
|
|
|
package main
|
2014-01-11 15:27:08 +01:00
|
|
|
|
2014-01-08 23:43:20 +01:00
|
|
|
/*
|
2014-01-01 13:36:48 +01:00
|
|
|
|
|
|
|
import (
|
2014-01-08 23:43:20 +01:00
|
|
|
_"fmt"
|
2014-01-01 13:36:48 +01:00
|
|
|
)
|
|
|
|
|
2014-01-02 23:02:24 +01:00
|
|
|
// This will eventually go away
|
|
|
|
var Db *MemDatabase
|
|
|
|
|
2014-01-01 13:36:48 +01:00
|
|
|
func Testing() {
|
2014-01-02 23:02:24 +01:00
|
|
|
db, _ := NewMemDatabase()
|
|
|
|
Db = db
|
|
|
|
|
2014-01-01 13:36:48 +01:00
|
|
|
bm := NewBlockManager()
|
|
|
|
|
2014-01-05 20:41:01 +01:00
|
|
|
tx := NewTransaction("\x00", 20, []string{"PUSH"})
|
2014-01-17 16:57:42 +01:00
|
|
|
txData := tx.RlpEncode()
|
2014-01-08 23:43:20 +01:00
|
|
|
//fmt.Printf("%q\n", txData)
|
2014-01-01 13:36:48 +01:00
|
|
|
|
|
|
|
copyTx := &Transaction{}
|
2014-01-17 16:57:42 +01:00
|
|
|
copyTx.RlpDecode(txData)
|
2014-01-08 23:43:20 +01:00
|
|
|
//fmt.Println(tx)
|
|
|
|
//fmt.Println(copyTx)
|
2014-01-01 13:36:48 +01:00
|
|
|
|
|
|
|
tx2 := NewTransaction("\x00", 20, []string{"SET 10 6", "LD 10 10"})
|
|
|
|
|
2014-01-02 23:02:24 +01:00
|
|
|
blck := CreateTestBlock([]*Transaction{tx2, tx})
|
2014-01-01 13:36:48 +01:00
|
|
|
|
|
|
|
bm.ProcessBlock( blck )
|
|
|
|
}
|
2014-01-08 23:43:20 +01:00
|
|
|
*/
|