Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: CheckQuorumConnections should not be running on regular non-watching nodes #5738

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/llmq/quorums.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,10 @@ void CQuorumManager::UpdatedBlockTip(const CBlockIndex* pindexNew, bool fInitial

void CQuorumManager::CheckQuorumConnections(const Consensus::LLMQParams& llmqParams, const CBlockIndex* pindexNew) const
{
if (!fMasternodeMode && !utils::IsWatchQuorumsEnabled()) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should not it be CQuorumManager::UpdatedBlockTip instead?

 void CQuorumManager::UpdatedBlockTip(const CBlockIndex* pindexNew, bool fInitialDownload) const
+    if (!fMasternodeMode && !utils::IsWatchQuorumsEnabled()) return;
     if (!m_mn_sync->IsBlockchainSynced()) {
         return;
     }

mapQuorumData seems used only for MNs; CleanupOldQuorumData and TriggerQuorumDataRecoveryThreads both check flags fMasternodeMode too.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch! 👍 There are indeed more related things to fix. I opened #5745 to address them all.

return;
}

auto lastQuorums = ScanQuorums(llmqParams.type, pindexNew, (size_t)llmqParams.keepOldConnections);

auto connmanQuorumsToDelete = connman.GetMasternodeQuorums(llmqParams.type);
Expand Down
Loading