-
Notifications
You must be signed in to change notification settings - Fork 1.2k
revert: "fix: avoid improper dual way connection attempts" + tests #7289
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -801,13 +801,28 @@ bool EnsureQuorumConnections(const Consensus::LLMQParams& llmqParams, CConnman& | |
| util_params.m_base_index->GetBlockHash().ToString()); | ||
|
|
||
| Uint256HashSet connections; | ||
| Uint256HashSet relayMembers; | ||
| if (isMember) { | ||
| connections = GetQuorumConnections(llmqParams, sporkman, util_params, myProTxHash, /*onlyOutbound=*/true); | ||
| // If all-members-connected is enabled for this quorum type, leverage the full-mesh | ||
| // connections for low-latency recovered sig propagation by treating all members as | ||
| // relay members (instead of the ring-based subset). This ensures peers will send | ||
| // QSENDRECSIGS to each other across the full mesh and set m_wants_recsigs widely. | ||
| if (IsAllMembersConnectedEnabled(llmqParams.type, sporkman)) { | ||
| for (const auto& dmn : members) { | ||
| if (dmn->proTxHash != myProTxHash) { | ||
| relayMembers.emplace(dmn->proTxHash); | ||
| } | ||
| } | ||
| } else { | ||
| relayMembers = GetQuorumRelayMembers(llmqParams, util_params, myProTxHash, true); | ||
| } | ||
| } else { | ||
| auto cindexes = CalcDeterministicWatchConnections(llmqParams.type, util_params.m_base_index, members.size(), 1); | ||
| for (auto idx : cindexes) { | ||
| connections.emplace(members[idx]->proTxHash); | ||
| } | ||
| relayMembers = connections; | ||
| } | ||
|
Comment on lines
803
to
826
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💬 Nitpick: Document why The detailed rationale for keeping source: ['claude'] |
||
| if (!connections.empty()) { | ||
| if (!connman.HasMasternodeQuorumNodes(llmqParams.type, util_params.m_base_index->GetBlockHash()) && | ||
|
|
@@ -826,7 +841,9 @@ bool EnsureQuorumConnections(const Consensus::LLMQParams& llmqParams, CConnman& | |
| LogPrint(BCLog::NET_NETCONN, debugMsg.c_str()); /* Continued */ | ||
| } | ||
| connman.SetMasternodeQuorumNodes(llmqParams.type, util_params.m_base_index->GetBlockHash(), connections); | ||
| connman.SetMasternodeQuorumRelayMembers(llmqParams.type, util_params.m_base_index->GetBlockHash(), connections); | ||
| } | ||
| if (!relayMembers.empty()) { | ||
| connman.SetMasternodeQuorumRelayMembers(llmqParams.type, util_params.m_base_index->GetBlockHash(), relayMembers); | ||
| } | ||
| return true; | ||
| } | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.