hypercore 10.35.3 → 10.35.4

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.
Files changed (2) hide show
  1. package/lib/core.js +3 -1
  2. package/package.json +1 -1
package/lib/core.js CHANGED
@@ -925,7 +925,9 @@ module.exports = class Core {
925
925
  openSkipBitfield () {
926
926
  if (this.skipBitfield !== null) return this.skipBitfield
927
927
  this.skipBitfield = new RemoteBitfield()
928
- this.skipBitfield.insert(0, this.bitfield.toBuffer(this.tree.length))
928
+ const buf = this.bitfield.toBuffer(this.tree.length)
929
+ const bitfield = new Uint32Array(buf.buffer, buf.byteOffset, buf.byteLength / 4)
930
+ this.skipBitfield.insert(0, bitfield)
929
931
  return this.skipBitfield
930
932
  }
931
933
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hypercore",
3
- "version": "10.35.3",
3
+ "version": "10.35.4",
4
4
  "description": "Hypercore is a secure, distributed append-only log",
5
5
  "main": "index.js",
6
6
  "scripts": {