libp2p-kad-dht
Advanced tools
Comparing version 0.14.9 to 0.14.10
@@ -0,1 +1,11 @@ | ||
<a name="0.14.10"></a> | ||
## [0.14.10](https://github.com/libp2p/js-libp2p-kad-dht/compare/v0.14.9...v0.14.10) (2019-03-27) | ||
### Bug Fixes | ||
* false discovery ([#92](https://github.com/libp2p/js-libp2p-kad-dht/issues/92)) ([466c992](https://github.com/libp2p/js-libp2p-kad-dht/commit/466c992)) | ||
<a name="0.14.9"></a> | ||
@@ -2,0 +12,0 @@ ## [0.14.9](https://github.com/libp2p/js-libp2p-kad-dht/compare/v0.14.8...v0.14.9) (2019-03-18) |
{ | ||
"name": "libp2p-kad-dht", | ||
"version": "0.14.9", | ||
"version": "0.14.10", | ||
"description": "JavaScript implementation of the Kad-DHT for libp2p", | ||
@@ -5,0 +5,0 @@ "leadMaintainer": "Vasco Santos <vasco.santos@moxy.studio>", |
@@ -125,4 +125,2 @@ 'use strict' | ||
this.dht._peerDiscovered(peer) | ||
this._log('added to the routing table: %s', peer.id.toB58String()) | ||
@@ -129,0 +127,0 @@ }) |
@@ -260,27 +260,2 @@ /* eslint-env mocha */ | ||
it('should emit a peer event when a peer is connected', function (done) { | ||
this.timeout(10 * 1000) | ||
const tdht = new TestDHT() | ||
tdht.spawn(2, (err, dhts) => { | ||
expect(err).to.not.exist() | ||
const dhtA = dhts[0] | ||
const dhtB = dhts[1] | ||
dhtA.on('peer', (peerInfo) => { | ||
expect(peerInfo).to.exist().mark() | ||
}) | ||
dhtB.on('peer', (peerInfo) => { | ||
expect(peerInfo).to.exist().mark() | ||
}) | ||
connect(dhtA, dhtB, (err) => { | ||
expect(err).to.not.exist() | ||
}) | ||
}) | ||
expect(2).checks(done) | ||
}) | ||
it('put - get', function (done) { | ||
@@ -287,0 +262,0 @@ this.timeout(10 * 1000) |
@@ -160,2 +160,25 @@ /* eslint-env mocha */ | ||
}) | ||
it('should discover closer peers', (done) => { | ||
const peer = peerInfos[0] | ||
// mock this so we can dial non existing peers | ||
dht.switch.dial = (peer, callback) => callback() | ||
const query = (p, cb) => { | ||
cb(null, { | ||
closerPeers: [peerInfos[2]] | ||
}) | ||
} | ||
const q = new Query(dht, peer.id.id, () => query) | ||
q.run([peerInfos[1].id], (err, res) => { | ||
expect(err).to.not.exist() | ||
}) | ||
dht.once('peer', (peerInfo) => { | ||
expect(peerInfo.id).to.eql(peerInfos[2].id) | ||
done() | ||
}) | ||
}) | ||
}) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
182507
5458