draft of blocks package

This commit is contained in:
Jae Kwon
2014-06-04 01:40:17 -07:00
parent 1c4f5e2506
commit 576d8815fe
5 changed files with 499 additions and 0 deletions

29
blocks/data_test.go Normal file
View File

@ -0,0 +1,29 @@
package blocks
import (
. "github.com/tendermint/tendermint/binary"
"testing"
"bytes"
"fmt"
)
func TestBlockData(t *testing.T) {
var bd = NewBlockData()
var tx Tx
tx = &SendTx{
Signature: Signature{AccountNumber(0), ByteSlice([]byte{7})},
Fee: 1,
To: AccountNumber(2),
Amount: 3,
}
bd.AddTx(tx)
buf := bytes.NewBuffer(nil)
bd.WriteTo(buf)
fmt.Println(len(buf.Bytes()))
}