hypercore 10.24.9 → 10.24.10

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 +6 -0
  2. package/package.json +1 -1
package/lib/core.js CHANGED
@@ -479,6 +479,12 @@ module.exports = class Core {
479
479
  this.bitfield.setRange(entry.bitfield.start, entry.bitfield.length, true)
480
480
  batch.commit()
481
481
 
482
+ if (batch.upgraded) {
483
+ this.header.tree.length = batch.length
484
+ this.header.tree.rootHash = batch.hash()
485
+ this.header.tree.signature = batch.signature
486
+ }
487
+
482
488
  const status = (batch.upgraded ? 0b0001 : 0) | updateContig(this.header, entry.bitfield, this.bitfield)
483
489
  this.onupdate(status, entry.bitfield, null, null)
484
490
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hypercore",
3
- "version": "10.24.9",
3
+ "version": "10.24.10",
4
4
  "description": "Hypercore is a secure, distributed append-only log",
5
5
  "main": "index.js",
6
6
  "scripts": {