mirror of
https://github.com/fluencelabs/tendermint
synced 2025-06-20 08:26:31 +00:00
30 lines
479 B
Go
30 lines
479 B
Go
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()))
|
|
|
|
}
|