mirror of
https://github.com/dashpay/dash.git
synced 2024-12-25 20:12:57 +01:00
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.
This commit is contained in:
parent
2dc1b06ec7
commit
8d763c1440
@ -313,7 +313,7 @@ std::vector<CQuorumCPtr> CQuorumManager::ScanQuorums(Consensus::LLMQType llmqTyp
|
|||||||
auto& params = Params().GetConsensus().llmqs.at(llmqType);
|
auto& params = Params().GetConsensus().llmqs.at(llmqType);
|
||||||
|
|
||||||
auto cacheKey = std::make_pair(llmqType, pindexStart->GetBlockHash());
|
auto cacheKey = std::make_pair(llmqType, pindexStart->GetBlockHash());
|
||||||
const size_t cacheMaxSize = 25; // largest active set + 1
|
const size_t cacheMaxSize = params.signingActiveQuorumCount + 1;
|
||||||
|
|
||||||
std::vector<CQuorumCPtr> result;
|
std::vector<CQuorumCPtr> result;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user