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.
- package/lib/core.js +3 -1
- 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
|
-
|
|
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
|
|