fix: add new quorum to cache for BuildQuorumFromCommitment

This commit is contained in:
Konstantin Akimov 2024-11-29 03:29:48 +07:00
parent 62360a3096
commit fd987f38bb
No known key found for this signature in database
GPG Key ID: 2176C4A5D01EA524

View File

@ -411,6 +411,12 @@ CQuorumPtr CQuorumManager::BuildQuorumFromCommitment(const Consensus::LLMQType l
quorum->Init(std::move(qc), pQuorumBaseBlockIndex, minedBlockHash, members);
if (populate_cache && llmq_params_opt->size == 1) {
WITH_LOCK(cs_map_quorums, mapQuorumsCache[llmqType].insert(quorumHash, quorum));
return quorum;
}
bool hasValidVvec = false;
if (WITH_LOCK(cs_db, return quorum->ReadContributions(*db))) {
hasValidVvec = true;