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

epidemic-broadcast-trees

Package Overview
Dependencies
Maintainers
18
Versions
47
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

epidemic-broadcast-trees - npm Package Compare versions

Comparing version 8.0.3 to 8.0.4

4

events.js

@@ -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 = {

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