hypercore 10.5.2 → 10.5.3

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/bitfield.js CHANGED
@@ -16,6 +16,7 @@ class BitfieldPage {
16
16
  constructor (index, segment) {
17
17
  this.dirty = false
18
18
  this.index = index
19
+ this.offset = index * BYTES_PER_PAGE - segment.offset
19
20
  this.bitfield = null
20
21
  this.segment = segment
21
22
 
package/lib/core.js CHANGED
@@ -262,12 +262,9 @@ module.exports = class Core {
262
262
  }
263
263
 
264
264
  start = this.bitfield.lastSet(start) + 1
265
- /* TODO: this borks for some reason, so needs a fix.
266
265
  end = this.bitfield.firstSet(end)
267
266
 
268
267
  if (end === -1) end = this.tree.length
269
- */
270
- while (end < this.tree.length && this.bitfield.get(end) === false) end++
271
268
 
272
269
  const offset = await this.tree.byteOffset(start * 2)
273
270
  const [byteEnd, byteEndLength] = await this.tree.byteRange((end - 1) * 2)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hypercore",
3
- "version": "10.5.2",
3
+ "version": "10.5.3",
4
4
  "description": "Hypercore is a secure, distributed append-only log",
5
5
  "main": "index.js",
6
6
  "scripts": {