hypercore
Advanced tools
Comparing version 10.37.12 to 10.37.13
@@ -186,2 +186,3 @@ const flat = require('flat-tree') | ||
appendRoot (node, ite) { | ||
node = unslabNode(node) | ||
this.hashCached = null | ||
@@ -204,3 +205,3 @@ this.upgraded = true | ||
const node = parentNode(this.tree.crypto, ite.parent(), a, b) | ||
const node = unslabNode(parentNode(this.tree.crypto, ite.parent(), a, b)) | ||
this.nodes.push(node) | ||
@@ -264,3 +265,3 @@ this.roots.pop() | ||
this.tree.fork = this.fork | ||
this.tree.signature = this.signature | ||
this.tree.signature = this.signature !== null ? unslab(this.signature) : null | ||
} | ||
@@ -435,3 +436,3 @@ | ||
this.byteLength = totalSize(roots) | ||
this.signature = signature | ||
this.signature = signature !== null ? unslab(signature) : null | ||
this.prologue = prologue | ||
@@ -460,3 +461,3 @@ | ||
const roots = await this.getRoots(length) | ||
const roots = unslabNodes(await this.getRoots(length)) | ||
@@ -678,3 +679,3 @@ batch.roots = roots | ||
while (batch.roots.length > i) batch.roots.pop() | ||
batch.roots.push(await this.get(root)) | ||
batch.roots.push(unslabNode(await this.get(root))) | ||
} | ||
@@ -827,3 +828,3 @@ | ||
for (const index of flat.fullRoots(2 * length)) { | ||
roots.push(await getStoredNode(storage, index, null, true)) | ||
roots.push(unslabNode(await getStoredNode(storage, index, null, true))) | ||
} | ||
@@ -1398,1 +1399,12 @@ | ||
} | ||
function unslabNodes (nodes) { | ||
for (const node of nodes) unslabNode(node) | ||
return nodes | ||
} | ||
function unslabNode (node) { | ||
if (node === null) return node | ||
node.hash = unslab(node.hash) | ||
return node | ||
} |
{ | ||
"name": "hypercore", | ||
"version": "10.37.12", | ||
"version": "10.37.13", | ||
"description": "Hypercore is a secure, distributed append-only log", | ||
@@ -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
277032
7759