mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2025-04-28 22:25:07 +03:00
Tweak link handshake
This commit is contained in:
parent
002b984c04
commit
109f59c7dc
3 changed files with 22 additions and 14 deletions
|
@ -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")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue