mirror of
https://github.com/dashpay/dash.git
synced 2024-12-25 12:02:48 +01:00
fix(llmq): Actually remove old masternode quorum connections (#4859)
This commit is contained in:
parent
9f27648dc2
commit
21bf0eacdb
@ -291,13 +291,15 @@ void CQuorumManager::EnsureQuorumConnections(const Consensus::LLMQParams& llmqPa
|
||||
|
||||
for (const auto& quorum : lastQuorums) {
|
||||
if (CLLMQUtils::EnsureQuorumConnections(llmqParams, quorum->m_quorum_base_block_index, WITH_LOCK(activeMasternodeInfoCs, return activeMasternodeInfo.proTxHash))) {
|
||||
continue;
|
||||
}
|
||||
if (connmanQuorumsToDelete.count(quorum->qc->quorumHash) > 0) {
|
||||
LogPrint(BCLog::LLMQ, "CQuorumManager::%s -- removing masternodes quorum connections for quorum %s:\n", __func__, quorum->qc->quorumHash.ToString());
|
||||
g_connman->RemoveMasternodeQuorumNodes(llmqParams.type, quorum->qc->quorumHash);
|
||||
if (connmanQuorumsToDelete.erase(quorum->qc->quorumHash) > 0) {
|
||||
LogPrint(BCLog::LLMQ, "CQuorumManager::%s -- llmqType[%d] h[%d] keeping mn quorum connections for quorum: [%d:%s]\n", __func__, int(llmqParams.type), pindexNew->nHeight, quorum->m_quorum_base_block_index->nHeight, quorum->m_quorum_base_block_index->GetBlockHash().ToString());
|
||||
}
|
||||
}
|
||||
}
|
||||
for (const auto& quorumHash : connmanQuorumsToDelete) {
|
||||
LogPrint(BCLog::LLMQ, "CQuorumManager::%s -- removing masternodes quorum connections for quorum %s:\n", __func__, quorumHash.ToString());
|
||||
g_connman->RemoveMasternodeQuorumNodes(llmqParams.type, quorumHash);
|
||||
}
|
||||
}
|
||||
|
||||
CQuorumPtr CQuorumManager::BuildQuorumFromCommitment(const Consensus::LLMQType llmqType, const CBlockIndex* pQuorumBaseBlockIndex) const
|
||||
|
Loading…
Reference in New Issue
Block a user