mirror of
https://github.com/logos-messaging/go-libp2p-rendezvous.git
synced 2026-01-05 22:33:11 +00:00
Registration records should have an actual peer ID
This commit is contained in:
parent
dbe6b0ddb5
commit
6c1d28214b
4
proto.go
4
proto.go
@ -22,7 +22,7 @@ const (
|
|||||||
)
|
)
|
||||||
|
|
||||||
type RegistrationRecord struct {
|
type RegistrationRecord struct {
|
||||||
Id []byte
|
Id peer.ID
|
||||||
Addrs [][]byte
|
Addrs [][]byte
|
||||||
Ns string
|
Ns string
|
||||||
Ttl int
|
Ttl int
|
||||||
@ -130,7 +130,7 @@ func newDiscoverResponse(regs []RegistrationRecord, cookie []byte) *pb.Message_D
|
|||||||
rns := reg.Ns
|
rns := reg.Ns
|
||||||
rreg.Ns = &rns
|
rreg.Ns = &rns
|
||||||
rreg.Peer = new(pb.Message_PeerInfo)
|
rreg.Peer = new(pb.Message_PeerInfo)
|
||||||
rreg.Peer.Id = reg.Id
|
rreg.Peer.Id = []byte(reg.Id)
|
||||||
rreg.Peer.Addrs = reg.Addrs
|
rreg.Peer.Addrs = reg.Addrs
|
||||||
rttl := int64(reg.Ttl)
|
rttl := int64(reg.Ttl)
|
||||||
rreg.Ttl = &rttl
|
rreg.Ttl = &rttl
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user