mirror of
https://github.com/fluencelabs/go-libp2p-kad-dht
synced 2025-04-24 22:32:13 +00:00
Add queried peer ID to query event
This commit is contained in:
parent
b62d46c2fe
commit
655ea5e262
@ -444,7 +444,7 @@ func (dht *IpfsDHT) FindPeer(ctx context.Context, id peer.ID) (pstore.PeerInfo,
|
||||
closer := pmes.GetCloserPeers()
|
||||
clpeerInfos := pb.PBPeersToPeerInfos(closer)
|
||||
|
||||
// see it we got the peer here
|
||||
// see if we got the peer here
|
||||
for _, npi := range clpeerInfos {
|
||||
if npi.ID == id {
|
||||
return &dhtQueryResult{
|
||||
@ -456,6 +456,7 @@ func (dht *IpfsDHT) FindPeer(ctx context.Context, id peer.ID) (pstore.PeerInfo,
|
||||
|
||||
notif.PublishQueryEvent(parent, ¬if.QueryEvent{
|
||||
Type: notif.PeerResponse,
|
||||
ID: p,
|
||||
Responses: clpeerInfos,
|
||||
})
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user