hypercore 11.16.1 → 11.16.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/audit.js +1 -1
- package/lib/bitfield.js +1 -1
- package/lib/core.js +4 -3
- package/package.json +1 -1
package/lib/audit.js
CHANGED
|
@@ -113,7 +113,7 @@ module.exports = async function auditCore (core, { tree = true, blocks = true, b
|
|
|
113
113
|
|
|
114
114
|
const page = core.bitfield.getBitfield(index)
|
|
115
115
|
if (page.bitfield) tx.putBitfieldPage(page.index, page.bitfield)
|
|
116
|
-
else tx.deleteBitfieldPage(page.
|
|
116
|
+
else tx.deleteBitfieldPage(page.index)
|
|
117
117
|
continue
|
|
118
118
|
}
|
|
119
119
|
|
package/lib/bitfield.js
CHANGED
|
@@ -492,7 +492,7 @@ module.exports = class Bitfield {
|
|
|
492
492
|
|
|
493
493
|
const pages = Math.ceil(length / BITS_PER_PAGE)
|
|
494
494
|
const buffer = b4a.alloc(pages * BYTES_PER_PAGE)
|
|
495
|
-
const stream = storage.createBitfieldStream()
|
|
495
|
+
const stream = storage.createBitfieldStream({ lt: pages })
|
|
496
496
|
|
|
497
497
|
for await (const { index, page } of stream) {
|
|
498
498
|
buffer.set(page, index * BYTES_PER_PAGE)
|
package/lib/core.js
CHANGED
|
@@ -815,9 +815,10 @@ async function getCoreInfo (storage) {
|
|
|
815
815
|
|
|
816
816
|
r.tryFlush()
|
|
817
817
|
|
|
818
|
+
const [authInfo, headInfo, hintsInfo] = await Promise.all([auth, head, hints])
|
|
818
819
|
return {
|
|
819
|
-
...
|
|
820
|
-
head:
|
|
821
|
-
hints:
|
|
820
|
+
...authInfo,
|
|
821
|
+
head: headInfo,
|
|
822
|
+
hints: hintsInfo
|
|
822
823
|
}
|
|
823
824
|
}
|