Comparing version
@@ -1083,3 +1083,3 @@ const b4a = require('b4a') | ||
? null | ||
: { length: indexedLength, hash: (await core.restoreBatch(indexedLength)).hash() } | ||
: { length: indexedLength, hash: await core.treeHash(indexedLength) } | ||
@@ -1348,4 +1348,8 @@ const next = this._viewStore.getViewCore(indexerManifests, name, prologue) | ||
} | ||
for (const [hex] of this._wakeupHints) { | ||
for (const [hex, length] of this._wakeupHints) { | ||
const key = b4a.from(hex, 'hex') | ||
if (length !== -1) { | ||
const w = this.activeWriters.get(key) | ||
if (w && w.length >= length) continue | ||
} | ||
promises.push(this._applyState.system.get(key)) | ||
@@ -1352,0 +1356,0 @@ } |
@@ -679,5 +679,4 @@ const ReadyResource = require('ready-resource') | ||
async _signViewCore (core, length) { | ||
const batch = await core.restoreBatch(length) | ||
batch.fork = 0 // views never fork, so always sign the non batch state by force | ||
const signature = crypto.sign(batch.signable(core.key), this.base.local.keyPair.secretKey) | ||
const s = await core.signable(length, 0) | ||
const signature = crypto.sign(s, this.base.local.keyPair.secretKey) | ||
return { signature, length } | ||
@@ -1073,6 +1072,6 @@ } | ||
const batch = await view.core.restoreBatch(length) | ||
const hash = await view.core.treeHash(length) | ||
return { | ||
hash: batch.hash(), | ||
hash, | ||
length | ||
@@ -1079,0 +1078,0 @@ } |
{ | ||
"name": "autobase", | ||
"version": "7.0.34", | ||
"version": "7.0.35", | ||
"description": "", | ||
@@ -39,3 +39,3 @@ "main": "index.js", | ||
"hyperbee": "^2.22.0", | ||
"hypercore": "^11.0.21", | ||
"hypercore": "^11.0.30", | ||
"hypercore-crypto": "^3.4.0", | ||
@@ -42,0 +42,0 @@ "hypercore-id-encoding": "^1.2.0", |
4965
0.06%182713
0Updated