hypercore 11.10.0 → 11.10.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/multisig.js +7 -1
  2. package/package.json +1 -1
package/lib/multisig.js CHANGED
@@ -37,7 +37,13 @@ async function partialSignature (core, signer, from, to = core.state.length, sig
37
37
 
38
38
  async function upgradeNodes (core, from, to) {
39
39
  const rx = core.state.storage.read()
40
- const p = await MerkleTree.proof(core.state, rx, { upgrade: { start: from, length: to - from } })
40
+ let p = null
41
+ try {
42
+ p = await MerkleTree.proof(core.state, rx, { upgrade: { start: from, length: to - from } })
43
+ } catch (err) {
44
+ rx.destroy()
45
+ throw err
46
+ }
41
47
  rx.tryFlush()
42
48
  return (await p.settle()).upgrade.nodes
43
49
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hypercore",
3
- "version": "11.10.0",
3
+ "version": "11.10.1",
4
4
  "description": "Hypercore is a secure, distributed append-only log",
5
5
  "main": "index.js",
6
6
  "scripts": {