Skip to content

Commit 09b017f

Browse files
codablockUdjinM6
authored andcommitted
Only load signingActiveQuorumCount + 1 quorums into cache (#3002)
No need to load 25 quorums when we're scanning for the larger quorums which only have 4 active quorums. This avoids loading thousands of masternode lists unnecessarily.
1 parent b75e1ce commit 09b017f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/llmq/quorums.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ std::vector<CQuorumCPtr> CQuorumManager::ScanQuorums(Consensus::LLMQType llmqTyp
313313
auto& params = Params().GetConsensus().llmqs.at(llmqType);
314314

315315
auto cacheKey = std::make_pair(llmqType, pindexStart->GetBlockHash());
316-
const size_t cacheMaxSize = 25; // largest active set + 1
316+
const size_t cacheMaxSize = params.signingActiveQuorumCount + 1;
317317

318318
std::vector<CQuorumCPtr> result;
319319

0 commit comments

Comments
 (0)