Socket
Socket
Sign inDemoInstall

libp2p-kad-dht

Package Overview
Dependencies
Maintainers
2
Versions
109
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

libp2p-kad-dht - npm Package Compare versions

Comparing version 0.14.6 to 0.14.7

10

CHANGELOG.md

@@ -0,1 +1,11 @@

<a name="0.14.7"></a>
## [0.14.7](https://github.com/libp2p/js-libp2p-kad-dht/compare/v0.14.6...v0.14.7) (2019-03-04)
### Bug Fixes
* put query for closest peers ([#85](https://github.com/libp2p/js-libp2p-kad-dht/issues/85)) ([84a40cd](https://github.com/libp2p/js-libp2p-kad-dht/commit/84a40cd))
<a name="0.14.6"></a>

@@ -2,0 +12,0 @@ ## [0.14.6](https://github.com/libp2p/js-libp2p-kad-dht/compare/v0.14.5...v0.14.6) (2019-02-25)

2

package.json
{
"name": "libp2p-kad-dht",
"version": "0.14.6",
"version": "0.14.7",
"description": "JavaScript implementation of the Kad-DHT for libp2p",

@@ -5,0 +5,0 @@ "leadMaintainer": "Vasco Santos <vasco.santos@moxy.studio>",

@@ -220,3 +220,3 @@ 'use strict'

(cb) => this._putLocal(key, rec, cb),
(cb) => this.getClosestPeers(key, cb),
(cb) => this.getClosestPeers(key, { shallow: true }, cb),
(peers, cb) => {

@@ -391,7 +391,17 @@ // Ensure we have a default `minPeers`

* @param {Buffer} key
* @param {Object} options
* @param {boolean} options.shallow shallow query
* @param {function(Error, Array<PeerId>)} callback
* @returns {void}
*/
getClosestPeers (key, callback) {
getClosestPeers (key, options, callback) {
this._log('getClosestPeers to %b', key)
if (typeof options === 'function') {
callback = options
options = {
shallow: false
}
}
utils.convertBuffer(key, (err, id) => {

@@ -413,3 +423,4 @@ if (err) {

cb(null, {
closerPeers: closer
closerPeers: closer,
success: options.shallow ? true : undefined
})

@@ -416,0 +427,0 @@ }

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc