hypercore 10.21.2 → 10.21.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 CHANGED
@@ -26,6 +26,7 @@ module.exports = class Core {
26
26
  this.bitfield = bitfield
27
27
  this.defaultAuth = auth
28
28
  this.truncating = 0
29
+ this.updating = false
29
30
  this.closed = false
30
31
 
31
32
  this._manifestFlushed = !!header.manifest
@@ -477,6 +478,7 @@ module.exports = class Core {
477
478
 
478
479
  try {
479
480
  if (!batch.commitable()) return false
481
+ this.updating = true
480
482
 
481
483
  const entry = {
482
484
  userData: null,
@@ -508,6 +510,7 @@ module.exports = class Core {
508
510
 
509
511
  if (this._shouldFlush()) await this._flushOplog()
510
512
  } finally {
513
+ this.updating = false
511
514
  this._mutex.unlock()
512
515
  }
513
516
 
package/lib/messages.js CHANGED
@@ -1,5 +1,6 @@
1
1
  const c = require('compact-encoding')
2
2
  const b4a = require('b4a')
3
+ const { DEFAULT_NAMESPACE } = require('./caps')
3
4
  const { INVALID_OPLOG_VERSION } = require('hypercore-errors')
4
5
 
5
6
  const EMPTY = b4a.alloc(0)
@@ -825,12 +826,11 @@ oplog.header = {
825
826
  return {
826
827
  key: old.signer.publicKey,
827
828
  manifest: {
828
- namespace: b4a.alloc(32),
829
829
  hash: old.types.tree,
830
830
  static: null,
831
831
  signer: {
832
832
  signature: old.types.signer,
833
- entropy: b4a.alloc(32),
833
+ namespace: DEFAULT_NAMESPACE,
834
834
  publicKey: old.signer.publicKey
835
835
  },
836
836
  multipleSigners: null
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hypercore",
3
- "version": "10.21.2",
3
+ "version": "10.21.4",
4
4
  "description": "Hypercore is a secure, distributed append-only log",
5
5
  "main": "index.js",
6
6
  "scripts": {