Skip to content

Commit

Permalink
feat: support Core 17 LLMQ params (#256)
Browse files Browse the repository at this point in the history
  • Loading branch information
shumkov authored May 17, 2022
1 parent baaed06 commit 2398f23
Show file tree
Hide file tree
Showing 3 changed files with 182 additions and 326 deletions.
14 changes: 14 additions & 0 deletions lib/deterministicmnlist/QuorumEntry.js
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,13 @@ QuorumEntry.getParams = function getParams(llmqType) {
params.maximumActiveQuorumsCount = 2;
return params;
case constants.LLMQ_TYPES.LLMQ_TYPE_LLMQ_DEVNET:
// @todo needs to be removed after 18 upgrade
if (QuorumEntry.isCore17) {
params.size = 10;
params.threshold = 3;
params.maximumActiveQuorumsCount = 7;
return params;
}
params.size = 12;
params.threshold = 6;
params.maximumActiveQuorumsCount = 4;
Expand Down Expand Up @@ -566,6 +573,13 @@ QuorumEntry.prototype.calculateHash = function calculateHash() {
return Hash.sha256sha256(this.toBufferForHashing()).reverse();
};

/**
* @todo Remove after Core 18 upgrade
*
* @type {boolean}
*/
QuorumEntry.isCore17 = false;

/**
* Creates a copy of QuorumEntry
* @return {QuorumEntry}
Expand Down
326 changes: 0 additions & 326 deletions test/deterministicmnlist/SimplifiedMNList.integration.js

This file was deleted.

Loading

0 comments on commit 2398f23

Please sign in to comment.