From 6c1d28214b5ed9d249d64c8602ffc30a2c175f2a Mon Sep 17 00:00:00 2001 From: vyzo Date: Mon, 23 Apr 2018 13:25:18 +0300 Subject: [PATCH] Registration records should have an actual peer ID --- proto.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/proto.go b/proto.go index f1c48d6..c1f004e 100644 --- a/proto.go +++ b/proto.go @@ -22,7 +22,7 @@ const ( ) type RegistrationRecord struct { - Id []byte + Id peer.ID Addrs [][]byte Ns string Ttl int @@ -130,7 +130,7 @@ func newDiscoverResponse(regs []RegistrationRecord, cookie []byte) *pb.Message_D rns := reg.Ns rreg.Ns = &rns rreg.Peer = new(pb.Message_PeerInfo) - rreg.Peer.Id = reg.Id + rreg.Peer.Id = []byte(reg.Id) rreg.Peer.Addrs = reg.Addrs rttl := int64(reg.Ttl) rreg.Ttl = &rttl