Tweak link handshake

This commit is contained in:
Neil Alexander 2023-06-18 20:28:14 +01:00
parent 002b984c04
commit 109f59c7dc
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944
3 changed files with 22 additions and 14 deletions

View file

@ -1,6 +1,7 @@
package core
import (
"bytes"
"crypto/ed25519"
"math/rand"
"reflect"
@ -22,7 +23,7 @@ func TestVersionRoundtrip(t *testing.T) {
test.publicKey = make(ed25519.PublicKey, ed25519.PublicKeySize)
rand.Read(test.publicKey)
encoded := test.encode()
encoded := bytes.NewBuffer(test.encode())
decoded := &version_metadata{}
if !decoded.decode(encoded) {
t.Fatalf("failed to decode")