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") } }