hypercore 11.0.45 → 11.0.46

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 CHANGED
@@ -559,7 +559,8 @@ module.exports = class Core {
559
559
  }
560
560
 
561
561
  // tmp log so we can see these
562
- console.log('[hypercore] conflict detected in ' + this.id + ' (writable=' + !!this.header.keyPair + ',quorum=' + this.header.manifest.quorum + ')')
562
+ const id = b4a.toString(this.discoveryKey, 'hex')
563
+ console.log('[hypercore] conflict detected in ' + id + ' (writable=' + !!this.header.keyPair + ',quorum=' + this.header.manifest.quorum + ')')
563
564
  await this._onconflict(proof)
564
565
  return true
565
566
  }
@@ -27,8 +27,6 @@ module.exports = class SessionState {
27
27
  this.atomized = null
28
28
  this.mutex = new Mutex()
29
29
 
30
- this.treeFork = -1 // only updated if truncated below dependency
31
-
32
30
  // merkle state
33
31
  this.roots = treeInfo.roots.length ? treeInfo.roots : []
34
32
  this.fork = treeInfo.fork || 0
@@ -111,7 +109,7 @@ module.exports = class SessionState {
111
109
  }
112
110
 
113
111
  get encryptionFork () {
114
- return this.treeFork === -1 ? this.core.header.tree.fork : this.treeFork
112
+ return this.core.header.tree.fork
115
113
  }
116
114
 
117
115
  async updateSnapshotStorage (storage) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hypercore",
3
- "version": "11.0.45",
3
+ "version": "11.0.46",
4
4
  "description": "Hypercore is a secure, distributed append-only log",
5
5
  "main": "index.js",
6
6
  "scripts": {