aboutsummaryrefslogtreecommitdiff
path: root/peer/messages_test.go
blob: b47810e652c37b7665d75d4f8a8d5384730cba5a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
package peer

import (
	"bytes"
	"testing"
)

func TestHandshake(t *testing.T) {
	h := Handshake{Proto: Proto}
	b := &bytes.Buffer{}
	h.Encode(b)
	t.Log(b.Bytes())
	if len(b.Bytes()) != len(Proto)+49 {
		t.Error("expexted X+49 len")
	}
}