hypercore 10.19.0 → 10.19.1

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 +2 -0
  2. package/package.json +1 -1
package/lib/core.js CHANGED
@@ -13,6 +13,7 @@ module.exports = class Core {
13
13
  constructor (header, crypto, oplog, tree, blocks, bitfield, auth, legacy, onupdate, onconflict) {
14
14
  this.onupdate = onupdate
15
15
  this.onconflict = onconflict
16
+ this.preupdate = null
16
17
  this.header = header
17
18
  this.crypto = crypto
18
19
  this.oplog = oplog
@@ -381,6 +382,7 @@ module.exports = class Core {
381
382
  bitfield
382
383
  }
383
384
 
385
+ if (this.preupdate !== null) await this.preupdate(batch, this.header.signer.publicKey)
384
386
  if (bitfield) await this._writeBlock(batch, bitfield.start, value)
385
387
 
386
388
  await this.oplog.append([entry], false)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hypercore",
3
- "version": "10.19.0",
3
+ "version": "10.19.1",
4
4
  "description": "Hypercore is a secure, distributed append-only log",
5
5
  "main": "index.js",
6
6
  "scripts": {