hyperdrive
Advanced tools
Comparing version 1.2.0 to 1.3.0
@@ -44,7 +44,7 @@ var thunky = require('thunky') | ||
var self = this | ||
var binary = this._decode ? opts.binary : opts.binary !== false | ||
var bytes = this._decode ? opts.bytes : opts.bytes !== false | ||
var start = opts.start || 0 | ||
var cursor = binary ? this.cursor() : null | ||
var cursor = bytes ? this.cursor() : null | ||
return binary ? from(readCursor) : from.obj(readBlocks) | ||
return bytes ? from(readCursor) : from.obj(readBlocks) | ||
@@ -51,0 +51,0 @@ function readBlocks (size, cb) { |
@@ -59,5 +59,6 @@ var protocol = require('./protocol') | ||
var len = peer.remoteBitfield.buffer.length * 8 | ||
var block = -1 | ||
for (var j = 0; j < subswarm.feed.want.length; j++) { | ||
var block = subswarm.feed.want[j].block | ||
block = subswarm.feed.want[j].block | ||
if (peer.amRequesting.get(block)) continue | ||
@@ -72,3 +73,3 @@ if (peer.remoteBitfield.get(block) && !subswarm.feed.bitfield.get(block)) { | ||
for (var i = 0; i < len; i++) { | ||
var block = (offset + i) % len | ||
block = (offset + i) % len | ||
if (peer.amRequesting.get(block)) continue | ||
@@ -75,0 +76,0 @@ if (peer.remoteBitfield.get(block) && !subswarm.feed.bitfield.get(block)) { |
{ | ||
"name": "hyperdrive", | ||
"version": "1.2.0", | ||
"version": "1.3.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", |
@@ -152,3 +152,3 @@ var tape = require('tape') | ||
tape('file stream', function (t) { | ||
t.plan(4) | ||
t.plan(5) | ||
var drive = create() | ||
@@ -170,2 +170,3 @@ | ||
feed.get(0, function (err, entry) { | ||
t.error(err, 'no error') | ||
drive.get(entry).createStream() | ||
@@ -172,0 +173,0 @@ .on('data', function (data) { |
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
44756
1284