hypercore
Advanced tools
Comparing version 10.37.27 to 10.37.28
@@ -6,2 +6,4 @@ const hypercoreCrypto = require('hypercore-crypto') | ||
const empty = b4a.alloc(32) | ||
// this is optimised for speed over mem atm | ||
@@ -37,2 +39,4 @@ // can be tweaked in the future | ||
if (!rightNode && !leftNode) continue | ||
stack.push(leftNode, rightNode) | ||
@@ -98,5 +102,7 @@ | ||
function getNode (index) { | ||
if (index * 40 + 40 > tree.byteLength) return null | ||
const state = { start: index * 40, end: index * 40 + 40, buffer: tree } | ||
const size = c.uint64.decode(state) | ||
const hash = c.fixed32.decode(state) | ||
if (size === 0 && hash.equals(empty)) return null | ||
return { index, size, hash } | ||
@@ -103,0 +109,0 @@ } |
{ | ||
"name": "hypercore", | ||
"version": "10.37.27", | ||
"version": "10.37.28", | ||
"description": "Hypercore is a secure, distributed append-only log", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
281869
7880