This repository has been archived by the owner on Mar 10, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 299
fix: response for findpeer and findprovs #1039
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Pick out the correct item from the response, do not assume the first is the one we want. License: MIT Signed-off-by: Alan Shaw <[email protected]>
1 task
License: MIT Signed-off-by: Alan Shaw <[email protected]>
alanshaw
pushed a commit
to libp2p/js-libp2p-delegated-content-routing
that referenced
this pull request
Jul 10, 2019
Depends on: * [ ] ipfs-inactive/js-ipfs-http-client#1039 cc @achingbrain License: MIT Signed-off-by: Alan Shaw <[email protected]>
alanshaw
pushed a commit
to libp2p/js-libp2p-delegated-content-routing
that referenced
this pull request
Jul 10, 2019
Needed for next js-ipfs release. Had to port some changes from #7 Depends on: * [ ] ipfs-inactive/js-ipfs-http-client#1039 cc @achingbrain License: MIT Signed-off-by: Alan Shaw <[email protected]>
1 task
jacobheun
approved these changes
Jul 10, 2019
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, and the tests at libp2p/js-libp2p-delegated-peer-routing#10, which are leveraging this, look good as well. 🚀
License: MIT Signed-off-by: Alan Shaw <[email protected]>
License: MIT Signed-off-by: Alan Shaw <[email protected]>
Go IPFS does not implement this option and the error that was being checked for was a false positive - it was an error to report no providers were found, which is not an error just a fact and this PR fixes this by removing that error and thus causing this test to now fail. License: MIT Signed-off-by: Alan Shaw <[email protected]>
dirkmc
reviewed
Jul 10, 2019
// https://github.com/libp2p/go-libp2p-core/blob/6e566d10f4a5447317a66d64c7459954b969bdab/routing/query.go#L18 | ||
if (!res || res.Type !== 2) { | ||
const errMsg = `key was not found (type 4)` | ||
return callback(errcode(new Error(errMsg), 'ERR_KEY_TYPE_4_NOT_FOUND')) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be ERR_KEY_TYPE_2_NOT_FOUND
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pick out the correct item from the response, do not assume the first is the one we want.
Also calls
toString
on the CID/PeerID so that we can pass CID instances directly to these functions.