Skip to content

Commit ff61071

Browse files
committed
fix: use correct hash of quorum as cycle hash to prevent possible misunderstandings
1 parent ba93745 commit ff61071

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/llmq/instantsend.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -932,8 +932,11 @@ std::unordered_set<uint256, StaticSaltedHasher> CInstantSendManager::ProcessPend
932932
if (blockIndex->nHeight + dkgInterval < m_chainstate.m_chain.Height()) {
933933
nSignHeight = blockIndex->nHeight + dkgInterval - 1;
934934
}
935+
// For RegTest non-rotating quorum cycleHash has directly quorum hash
936+
auto quorum = llmq_params.useRotation ? llmq::SelectQuorumForSigning(llmq_params, m_chainstate.m_chain, qman,
937+
id, nSignHeight, signOffset)
938+
: qman.GetQuorum(llmq_params.type, islock->cycleHash);
935939

936-
auto quorum = llmq::SelectQuorumForSigning(llmq_params, m_chainstate.m_chain, qman, id, nSignHeight, signOffset);
937940
if (!quorum) {
938941
// should not happen, but if one fails to select, all others will also fail to select
939942
return {};

0 commit comments

Comments
 (0)