Skip to content

Commit

Permalink
Merge pull request ipfs#67 from hermanjunge/master
Browse files Browse the repository at this point in the history
Add queried peer ID to query event
  • Loading branch information
Stebalien authored Jul 19, 2017
2 parents b62d46c + e55dcbb commit a649991
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ env:
- IPFS_REUSEPORT=false

go:
- 1.7
- 1.8

install: true

Expand Down
3 changes: 2 additions & 1 deletion routing.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand All @@ -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,
})

Expand Down

0 comments on commit a649991

Please sign in to comment.