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: discovery modules #486

Merged
merged 2 commits into from
Nov 28, 2019
Merged

Conversation

vasco-santos
Copy link
Member

@vasco-santos vasco-santos commented Nov 28, 2019

Made necessary changes to integrate discovery modules, including the DHT random-walk.

Needs:

Copy link
Contributor

@jacobheun jacobheun left a comment

Choose a reason for hiding this comment

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

Just some minor nits. Can you check the conflict?

src/index.js Outdated
@@ -160,6 +160,7 @@ class Libp2p extends EventEmitter {
log('libp2p is starting')
try {
await this._onStarting()
this._isStarted = true
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we should put this in _onDidStart as that keeps all post startup changes there.

src/index.js Outdated
// Peer discovery
if (this._modules.peerDiscovery) {
this._setupPeerDiscovery()
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this if necessary? I think it would be good to have any necessary checks inside of _setupPeerDiscovery. I think it will be much easier for us to avoid bugs if we have the functions handle their checks.

Copy link
Contributor

@jacobheun jacobheun left a comment

Choose a reason for hiding this comment

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

LGTM! 🚀

@jacobheun jacobheun merged commit 4ca569c into refactor/async-await Nov 28, 2019
@jacobheun jacobheun deleted the feat/discovery-modules branch November 28, 2019 21:50
jacobheun pushed a commit that referenced this pull request Dec 12, 2019
* feat: discovery modules

* chore: address review
jacobheun pushed a commit that referenced this pull request Jan 24, 2020
* feat: discovery modules

* chore: address review
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.

2 participants