op-geth/testing.go

34 lines
540 B
Go
Raw Normal View History

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