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.
- package/lib/verifier.js +5 -0
- 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',
|