Socket
Socket
Sign inDemoInstall

hyperdrive

Package Overview
Dependencies
Maintainers
1
Versions
271
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hyperdrive - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

test/feed-info.js

13

lib/feed-info.js

@@ -177,2 +177,3 @@ var events = require('events')

var top = hash.data(data)
var batch = []
var want = 2 * block

@@ -189,2 +190,3 @@ var offset = 0

batch.push({type: 'put', key: self.prefix + digest.index, value: digest.hash})
hashes.get(this.prefix + want, loop)

@@ -216,11 +218,2 @@

if (want === digest.index) return write(null)
var batch = new Array(1 + offset)
var i = 0
batch[i++] = {type: 'put', key: self.prefix + digest.index, value: digest.hash}
for (i = 0; i < offset; i++) {
var next = proof[i]
batch[i + 1] = {type: 'put', key: self.prefix + next.index, value: next.hash}
}
hashes.batch(batch, write)

@@ -237,2 +230,3 @@ }

if (offset < proof.length && proof[offset].index === sibling) {
batch.push({type: 'put', key: self.prefix + proof[offset].index, value: proof[offset].hash})
next(null, proof[offset++].hash)

@@ -248,2 +242,3 @@ } else {

else top = hash.tree(top, sibling)
batch.push({type: 'put', key: self.prefix + want, value: top})
hashes.get(self.prefix + want, loop)

@@ -250,0 +245,0 @@ }

@@ -157,2 +157,9 @@ var protocol = require('./protocol')

else top = hash.tree(top, sibling)
batch.push({
type: 'put',
key: ptr + want,
value: top
})
getHash(want, loop)

@@ -159,0 +166,0 @@ }

{
"name": "hyperdrive",
"version": "1.0.2",
"version": "1.0.3",
"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",

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