Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/rest/client: auto-handling of libp2p endpoints #498

Merged
merged 2 commits into from Aug 14, 2018

Conversation

hsanjuan
Copy link
Collaborator

This removes PeerAddr and uses APIAddr directly, figuring out if it is
a Peer multiaddress or not.

PeerAddr is actually kept for compatiblity.

It also fixes a bad panic when resolving returned 0 results

License: MIT
Signed-off-by: Hector Sanjuan code@hector.link

@hsanjuan hsanjuan self-assigned this Aug 10, 2018
@ghost ghost added the status/in-progress In progress label Aug 10, 2018
This removes PeerAddr and uses APIAddr directly, figuring out if it is
a Peer multiaddress or not.

PeerAddr is actually kept for compatiblity.

It also fixes a bad panic when resolving returned 0 results

License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
@hsanjuan hsanjuan added need/review Needs a review and removed status/in-progress In progress labels Aug 10, 2018
@coveralls
Copy link

coveralls commented Aug 10, 2018

Coverage Status

Coverage increased (+0.07%) to 68.22% when pulling c1363f3 on fix/client-resolve-panic into ac08292 on master.

Copy link
Contributor

@lanzafame lanzafame left a comment

Choose a reason for hiding this comment

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

LGTM, just after some clarification for the one godoc comment.

// (takes precedence over host:port). It this address contains
// an /ipfs/, /p2p/ or /dnsaddr, the API will be contacted
// through a libp2p tunnel, thus getting encryption for
// free. The latter overrides any SSL configurations.
Copy link
Contributor

Choose a reason for hiding this comment

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

The latter overrides any SSL configurations.

I am not sure what is going to override any SSL configurations? On first read, I thought latter was referring to /dnsaddr but that doesn't make much sense.

License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
@ghost ghost added the status/in-progress In progress label Aug 13, 2018
@hsanjuan
Copy link
Collaborator Author

@lanzafame should be good now

@hsanjuan hsanjuan merged commit 9baffd3 into master Aug 14, 2018
@ghost ghost removed the status/in-progress In progress label Aug 14, 2018
@hsanjuan hsanjuan deleted the fix/client-resolve-panic branch August 14, 2018 09:34
@hsanjuan hsanjuan mentioned this pull request Aug 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need/review Needs a review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants