Skip to content

Pass maxProviders to content routing #183

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

Merged
merged 8 commits into from
Dec 6, 2018
Merged

Pass maxProviders to content routing #183

merged 8 commits into from
Dec 6, 2018

Conversation

jacobheun
Copy link
Contributor

@jacobheun jacobheun commented Dec 5, 2018

With libp2p 0.24 you can now pass options objects to findProviders. The latest dht updates also include support for maxProviders.

This updates the call to findProviders so that both the maxProviders and maxTimeout options are sent.

Libp2p 0.24 will be in the js-ipfs 0.34 release, so we should be able to get this update in there as well.

Also in this PR:

  • Update dependencies, also use libp2p-mplex instead of libp2p-multiplex
  • Fix linting as a result of the latest Aegir
  • Drop non jenkins ci files
  • Remove .npmignore in favor of package.json files attribute
  • Change tests to use 512 instead of 1024 keys, we dont need 1024 for testing

The bit change to the key reduced the test:node time locally quite a bit:
Before

real    0m39.634s
user    0m26.516s
sys     0m1.095s

After

real    0m24.447s
user    0m11.426s
sys     0m1.023s

package.json Outdated
@@ -86,8 +90,7 @@
"varint-decoder": "~0.1.1"
},
"pre-push": [
"lint",
"test"
"lint"
Copy link
Member

Choose a reason for hiding this comment

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

Can we please keep the pre-push testing. I think they run fast enough so that it is OK.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added that back.

Copy link
Member

@vasco-santos vasco-santos left a comment

Choose a reason for hiding this comment

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

Looks good to me! 👍

Copy link
Member

@vmx vmx left a comment

Choose a reason for hiding this comment

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

Thanks for also taking care of updating the deps and fixing the linting errors.

@vmx vmx merged commit f83951c into master Dec 6, 2018
@ghost ghost removed the status/in-progress In progress label Dec 6, 2018
@vmx vmx deleted the feat/max-providers branch December 6, 2018 11:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants