Skip to content

Commit fdba615

Browse files
codablockpanleone
authored andcommitted
Introduce startBlockHeight to make things more explicit
1 parent 7bca9a2 commit fdba615

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
@@ -558,10 +558,11 @@ CQuorumCPtr CSigningManager::SelectQuorumForSigning(Consensus::LLMQType llmqType
558558
CBlockIndex* pindexStart;
559559
{
560560
LOCK(cs_main);
561-
if (signHeight - SIGN_HEIGHT_OFFSET > chainActive.Height()) {
561+
int startBlockHeight = signHeight - SIGN_HEIGHT_OFFSET;
562+
if (startBlockHeight > chainActive.Height()) {
562563
return nullptr;
563564
}
564-
pindexStart = chainActive[signHeight - SIGN_HEIGHT_OFFSET];
565+
pindexStart = chainActive[startBlockHeight];
565566
}
566567

567568
auto quorums = quorumManager->ScanQuorums(llmqType, pindexStart, poolSize);

0 commit comments

Comments
 (0)