hyperdrive
Advanced tools
Comparing version 1.3.1 to 1.4.0
@@ -59,2 +59,3 @@ var protocol = require('./protocol') | ||
function fetchPeer (peer) { | ||
if (peer.remoteChoking) return | ||
while (true) { | ||
@@ -149,2 +150,6 @@ if (peer.stream.inflight >= 5) return // max 5 inflight requests | ||
ch.on('unchoke', function () { | ||
subswarm.fetch(ch) | ||
}) | ||
ch.on('response', function (block, data, proof) { | ||
@@ -159,2 +164,3 @@ debug('[channel %s] rcvd response #%d (%d bytes, proof contained %d hashes)', name, block, data.length, proof.length) | ||
ch.on('request', function (block) { | ||
if (ch.amChoking) return | ||
debug('[channel %s] rcvd request #%d', name, block) | ||
@@ -182,2 +188,4 @@ subswarm.feed.get(block, function (err, data) { | ||
ch.bitfield(subswarm.feed.bitfield) | ||
ch.unchoke() // for now always unchoke. #yolo | ||
subswarm.fetch(ch) | ||
}) | ||
@@ -184,0 +192,0 @@ } |
{ | ||
"name": "hyperdrive", | ||
"version": "1.3.1", | ||
"version": "1.4.0", | ||
"description": "A file sharing network based on rabin file chunking and append only feeds of data verified by merkle trees.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
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
45445
1295
1
2038