fix: adjust llmq_max_blocks()

This commit is contained in:
UdjinM6 2023-06-03 02:32:03 +03:00
parent 35b0d5f7c8
commit 86e8556ecc

View File

@ -555,7 +555,7 @@ public:
constexpr int llmq_max_blocks() { constexpr int llmq_max_blocks() {
int max_blocks{0}; int max_blocks{0};
for (const auto& llmq : Consensus::available_llmqs) { for (const auto& llmq : Consensus::available_llmqs) {
int blocks = llmq.useRotation ? llmq.dkgInterval * 4 : llmq.dkgInterval * llmq.signingActiveQuorumCount; int blocks = (llmq.useRotation ? 1 : llmq.signingActiveQuorumCount) * llmq.dkgInterval;
max_blocks = std::max(max_blocks, blocks); max_blocks = std::max(max_blocks, blocks);
} }
return max_blocks; return max_blocks;