epidemic-broadcast-trees
Advanced tools
Comparing version 8.0.3 to 8.0.4
@@ -174,5 +174,5 @@ 'use strict' | ||
for(var id in state.follows) { | ||
var seq = clock[id], lseq = state.clock[id] || 0 | ||
var seq = clock[id] || 0, lseq = state.clock[id] || 0 | ||
//BLOCK: check wether id has blocked this peer | ||
if(isShared(state, id, ev.id) && seq !== -1 && seq !== lseq) { | ||
if(isShared(state, id, ev.id) && seq !== -1 && seq !== state.clock[id]) { | ||
@@ -179,0 +179,0 @@ //if we are already replicating, and this feed is at zero, ask for it anyway, |
{ | ||
"name": "epidemic-broadcast-trees", | ||
"description": "bandwidth efficient broadcast gossip", | ||
"version": "8.0.3", | ||
"version": "8.0.4", | ||
"homepage": "https://github.com/dominictarr/epidemic-broadcast-trees", | ||
@@ -6,0 +6,0 @@ "repository": { |
@@ -210,2 +210,17 @@ var test = require('tape') | ||
test('replicate a hops=2 peer that my hops=1 friend still doesnt have (2)', function (t) { | ||
var state = events.initialize() | ||
state = events.clock(state, {}) | ||
state = events.follow(state, {id: 'alice', value: true}) | ||
state = events.follow(state, {id: 'bob', value: true}) | ||
state = events.connect(state, {id: 'alice', client: false}) | ||
state = events.peerClock(state, {id: 'alice', value: {'alice': 0, 'bob': 0}}) | ||
t.ok(state.peers['alice'].replicating['bob']) | ||
t.end() | ||
}) | ||
test('reply to any clock they send, 1', function (t) { | ||
@@ -212,0 +227,0 @@ var state = { |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
105659
2421
0