Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

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.18.0 to 0.18.1

10

CHANGELOG.md

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

<a name="0.18.1"></a>
## [0.18.1](https://github.com/libp2p/js-libp2p-kad-dht/compare/v0.18.0...v0.18.1) (2019-12-05)
### Bug Fixes
* find providers should yield when found locally ([#160](https://github.com/libp2p/js-libp2p-kad-dht/issues/160)) ([e40834a](https://github.com/libp2p/js-libp2p-kad-dht/commit/e40834a))
<a name="0.18.0"></a>

@@ -2,0 +12,0 @@ # [0.18.0](https://github.com/libp2p/js-libp2p-kad-dht/compare/v0.17.1...v0.18.0) (2019-11-30)

2

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

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

@@ -94,3 +94,7 @@ 'use strict'

if (out.length >= n) {
return out.toArray()
// yield values
for (const pInfo of out.toArray()) {
yield pInfo
}
return
}

@@ -97,0 +101,0 @@

@@ -487,2 +487,19 @@ /* eslint-env mocha */

})
it('find one provider locally', async function () {
this.timeout(20 * 1000)
const val = values[0]
const tdht = new TestDHT()
const [dht] = await tdht.spawn(1)
sinon.stub(dht.providers, 'getProviders').returns([dht.peerInfo.id])
// Find provider
const res = await all(dht.findProviders(val.cid, { maxNumProviders: 1 }))
expect(res).to.exist()
expect(res).to.have.length(1)
return tdht.teardown()
})
})

@@ -489,0 +506,0 @@

Sorry, the diff of this file is not supported yet

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