hypercore 11.30.0 → 11.30.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/verifier.js +5 -0
  2. package/package.json +1 -1
package/lib/verifier.js CHANGED
@@ -214,6 +214,11 @@ module.exports = class Verifier {
214
214
  static createManifest(inp) {
215
215
  if (!inp) return null
216
216
 
217
+ if (inp.quorum && inp.quorum < 0) throw BAD_ARGUMENT('Quorum cannot be negative')
218
+ if (inp.quorum && inp.signers && inp.quorum > inp.signers.length) {
219
+ throw BAD_ARGUMENT('Quorum should not be higher than the number of signers')
220
+ }
221
+
217
222
  const manifest = {
218
223
  version: getManifestVersion(inp), // defaults to v1
219
224
  hash: 'blake2b',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hypercore",
3
- "version": "11.30.0",
3
+ "version": "11.30.1",
4
4
  "description": "Hypercore is a secure, distributed append-only log",
5
5
  "main": "index.js",
6
6
  "scripts": {