-
Notifications
You must be signed in to change notification settings - Fork 60
fix: no more circular dependency, become a good block of libp2p #13
Conversation
3c41724
to
e795c8c
Compare
src/index.js
Outdated
|
||
/** | ||
* Number of closest peers to return on kBucket search | ||
* Number of closest peers to return on kBucket search, default 20 |
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 is not 20 in the code but 6
@@ -11,23 +11,26 @@ const timeout = require('async/timeout') | |||
const retry = require('async/retry') |
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.
👎 for the rename
e795c8c
to
ee64411
Compare
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.
Not too familiar with DHT internals, but apart from one comment, the javascript look solid :)
src/index.js
Outdated
*/ | ||
constructor (libp2p, kBucketSize, datastore) { | ||
constructor (swarm, options) { | ||
assert(swarm, 'libp2p-kad-dht requires a instance of kad-dht') |
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.
don't you mean "libp2p-kad-dht requires a instance of swarm"?
CI is failing due to previously reported bug: #8 Passes locally. |
Fix #9. Just one last thing, fix:
by leveling up swarm.dial to also support PeerId instead of just PeerInfo.