hypercore-protocol
Advanced tools
Comparing version 6.10.0 to 6.11.0
@@ -440,2 +440,3 @@ var stream = require('readable-stream') | ||
Protocol.prototype._sameKey = function () { | ||
if (!this.encrypted) return true | ||
if (!this.discoveryKey || !this.remoteDiscoveryKey) return true | ||
@@ -442,0 +443,0 @@ if (this.remoteDiscoveryKey.toString('hex') === this.discoveryKey.toString('hex')) return true |
{ | ||
"name": "hypercore-protocol", | ||
"version": "6.10.0", | ||
"version": "6.11.0", | ||
"description": "Stream that implements the hypercore protocol", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
19
test.js
@@ -545,1 +545,20 @@ var tape = require('tape') | ||
}) | ||
tape('encrypt: false should ignore the first key', function (t) { | ||
t.plan(1) | ||
var a = protocol({ encrypt: false }) | ||
var b = protocol({ encrypt: false }) | ||
var ch1 = a.feed(KEY) | ||
b.feed(OTHER_KEY) | ||
var ch2 = b.feed(KEY) | ||
ch1.on('data', function (data) { | ||
t.same(data, {index: 42, signature: null, value: bufferFrom('hi'), nodes: []}) | ||
}) | ||
ch2.data({index: 42, value: bufferFrom('hi')}) | ||
a.pipe(b).pipe(a) | ||
}) |
Sorry, the diff of this file is not supported yet
68832
2066