-
Notifications
You must be signed in to change notification settings - Fork 445
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
fix: remove unneeded peerbook puts #348
Conversation
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!
I just requested a minor change to pass the callback immediately, instead of having a function to call it. After you change that, and this is good to go.
src/index.js
Outdated
@@ -246,7 +245,6 @@ class Node extends EventEmitter { | |||
|
|||
this._switch.dial(peerInfo, protocol, (err, conn) => { |
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.
We can just pass the callback now. Lines below have to be removed
this._switch.dial(peerInfo, protocol, (err, conn) => { | |
this._switch.dial(peerInfo, protocol, callback) |
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.
Ah yeah, good call! I've updated those.
src/index.js
Outdated
@@ -275,9 +273,6 @@ class Node extends EventEmitter { | |||
if (err) { return callback(err) } | |||
|
|||
this._switch.dialFSM(peerInfo, protocol, (err, connFSM) => { |
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.
this._switch.dialFSM(peerInfo, protocol, (err, connFSM) => { | |
this._switch.dialFSM(peerInfo, protocol, callback) |
With libp2p/js-libp2p-kad-dht#92 the dht test for peer discovery was out of date. I fixed it and updated the other tests to use lower intervals so we dont have to wait 10seconds for discovery to happen.
The circuit tests were also inaccurate so those were fixed.
Switch had a significant number of code added recently, so the bundle size threshold needed to be increased slightly.