Skip to content

Commit 7beb530

Browse files
authored
feat: add single node quorum (#304)
1 parent cc488c5 commit 7beb530

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

lib/constants/index.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,9 @@ module.exports = {
9292
// for devnet testing only
9393
// 12 members, 8 (67%) threshold, one per hour
9494
LLMQ_DEVNET_PLATFORM: 107,
95+
// for testing only
96+
// 1 member.
97+
LLMQ_SINGLE_NODE: 111,
9598
},
9699

97100
// when selecting a quorum for signing and verification, we use this offset as

lib/deterministicmnlist/QuorumEntry.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -407,6 +407,11 @@ QuorumEntry.getParams = function getParams(llmqType) {
407407
params.threshold = 8;
408408
params.maximumActiveQuorumsCount = 4;
409409
return params;
410+
case constants.LLMQ_TYPES.LLMQ_SINGLE_NODE:
411+
params.size = 1;
412+
params.threshold = 1;
413+
params.maximumActiveQuorumsCount = 2;
414+
return params;
410415
default:
411416
throw new Error(`Invalid llmq type ${llmqType}`);
412417
}

lib/deterministicmnlist/SimplifiedMNList.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -398,6 +398,7 @@ SimplifiedMNList.prototype.getLLMQTypes = function getLLMQTypes() {
398398
constants.LLMQ_TYPES.LLMQ_TYPE_TEST_INSTANTSEND,
399399
constants.LLMQ_TYPES.LLMQ_TYPE_TEST_DIP0024,
400400
constants.LLMQ_TYPES.LLMQ_TEST_PLATFORM,
401+
constants.LLMQ_TYPES.LLMQ_SINGLE_NODE,
401402
];
402403
return llmqTypes;
403404
}

0 commit comments

Comments
 (0)