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

epidemic-broadcast-trees

Package Overview
Dependencies
Maintainers
1
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 3.0.0 to 3.0.1

stream.js

6

index.js

@@ -85,3 +85,5 @@ 'use strict'

if(isNote(states[k].effect)) {
get(k, states[k].effect, function (err, msg) {
var seq = states[k].effect
states[k].effect = null
get(k, seq, function (err, msg) {
if(msg) {

@@ -249,3 +251,1 @@ maybeQueue(k, states[k] = S.gotMessage(states[k], msg))

{
"name": "epidemic-broadcast-trees",
"description": "",
"version": "3.0.0",
"version": "3.0.1",
"homepage": "https://github.com/dominictarr/epidemic-broadcast-trees",

@@ -6,0 +6,0 @@ "repository": {

@@ -104,4 +104,5 @@ 'use strict'

if(isMessage(state.ready)) {
if(state.ready.sequence <= msg.sequence)
if(state.ready.sequence <= msg.sequence) {
state.ready = null
}
}

@@ -111,4 +112,5 @@ if(isOldMessage(state, msg)) {

//let read move us out of tx mode,
if(state.remote.tx)
if(state.remote.tx) {
_state.ready = -(seq + 1)
}
//XXX: there might be a race here if we are cancelling this feed

@@ -121,7 +123,9 @@ }

_state.effect = msg
if(state.remote.tx == false)
if(state.remote.tx == false) {
state.ready = state.local.seq
}
}
else {
//this means something went really wrong
console.log('WRONG MESSAGE', msg, state)
_state.error = true

@@ -169,4 +173,8 @@ }

var _state = clone(state)
//this shouldn't really happen, but this is a hack
//to support recent changes to secure-scuttlebutt.
if(msg.sequence <= _state.local.seq)
return _state
_state.local.seq = msg.sequence
if(state.local.tx) {

@@ -224,2 +232,1 @@ if(isNextTxMessage(state, msg)) {

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