Skip to content
This repository has been archived by the owner on Mar 10, 2020. It is now read-only.

fix: dht find peer and providers #368

Merged
merged 1 commit into from
Oct 15, 2018
Merged

Conversation

vasco-santos
Copy link
Contributor

Fixes for getting Awesome Endeavour: DHT Part II on track.

  • findprovs

The findproviders kad-dht function, which is provided by js-libp2p through findprovs function, receives a PeerInfo array in the resulting callback, as js-libp2p-kad-dht/index.js#L432. Accordingly, we need to add p.id.

  • findpeer

The findPeer kad-dht function, which is provided by js-libp2p through kad-dht findpeer function, receives an error, if the peer was not found, as js-libp2p-kad-dht/index.js#L527. This way, it should receive an error.

Copy link
Contributor

@alanshaw alanshaw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@alanshaw alanshaw merged commit 40f796f into master Oct 15, 2018
@alanshaw alanshaw deleted the fix/dht-find-peer-and-providers branch October 15, 2018 10:19
@ghost ghost removed the in progress label Oct 15, 2018
@alanshaw
Copy link
Contributor

@vasco-santos I've added ipfs/js-ipfs#1634 - would you mind reviewing and please take note of the tests that are currently failing (and so skipped) ;)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants