Skip to content

Commit b2d150a

Browse files
committed
Introduce startBlockHeight to make things more explicit
1 parent b7bb90f commit b2d150a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/llmq/quorums_signing.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -562,10 +562,11 @@ CQuorumCPtr CSigningManager::SelectQuorumForSigning(Consensus::LLMQType llmqType
562562
uint256 startBlock;
563563
{
564564
LOCK(cs_main);
565-
if (signHeight - SIGN_HEIGHT_OFFSET > chainActive.Height()) {
565+
int startBlockHeight = signHeight - SIGN_HEIGHT_OFFSET;
566+
if (startBlockHeight > chainActive.Height()) {
566567
return nullptr;
567568
}
568-
startBlock = chainActive[signHeight - SIGN_HEIGHT_OFFSET]->GetBlockHash();
569+
startBlock = chainActive[startBlockHeight]->GetBlockHash();
569570
}
570571

571572
auto quorums = quorumManager->ScanQuorums(llmqType, startBlock, poolSize);

0 commit comments

Comments
 (0)