Commit a649991f authored by Steven Allen's avatar Steven Allen Committed by GitHub

Merge pull request #67 from hermanjunge/master

Add queried peer ID to query event
parents b62d46c2 e55dcbb2
......@@ -7,7 +7,7 @@ env:
- IPFS_REUSEPORT=false
go:
- 1.7
- 1.8
install: true
......
......@@ -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, &notif.QueryEvent{
Type: notif.PeerResponse,
ID: p,
Responses: clpeerInfos,
})
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment