Skip to content

Commit 7e782ff

Browse files
fix: avoid improper dual way connection attempts
1 parent 1f95f07 commit 7e782ff

File tree

1 file changed

+1
-18
lines changed

1 file changed

+1
-18
lines changed

src/llmq/utils.cpp

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -858,29 +858,14 @@ bool EnsureQuorumConnections(const Consensus::LLMQParams& llmqParams, CConnman&
858858
__func__, isMember, pQuorumBaseBlockIndex->GetBlockHash().ToString());
859859

860860
Uint256HashSet connections;
861-
Uint256HashSet relayMembers;
862861
if (isMember) {
863862
connections = GetQuorumConnections(llmqParams, dmnman, qsnapman, sporkman, pQuorumBaseBlockIndex, myProTxHash,
864863
true);
865-
// If all-members-connected is enabled for this quorum type, leverage the full-mesh
866-
// connections for low-latency recovered sig propagation by treating all members as
867-
// relay members (instead of the ring-based subset). This ensures peers will send
868-
// QSENDRECSIGS to each other across the full mesh and set m_wants_recsigs widely.
869-
if (IsAllMembersConnectedEnabled(llmqParams.type, sporkman)) {
870-
for (const auto& dmn : members) {
871-
if (dmn->proTxHash != myProTxHash) {
872-
relayMembers.emplace(dmn->proTxHash);
873-
}
874-
}
875-
} else {
876-
relayMembers = GetQuorumRelayMembers(llmqParams, dmnman, qsnapman, pQuorumBaseBlockIndex, myProTxHash, true);
877-
}
878864
} else {
879865
auto cindexes = CalcDeterministicWatchConnections(llmqParams.type, pQuorumBaseBlockIndex, members.size(), 1);
880866
for (auto idx : cindexes) {
881867
connections.emplace(members[idx]->proTxHash);
882868
}
883-
relayMembers = connections;
884869
}
885870
if (!connections.empty()) {
886871
if (!connman.HasMasternodeQuorumNodes(llmqParams.type, pQuorumBaseBlockIndex->GetBlockHash()) &&
@@ -898,9 +883,7 @@ bool EnsureQuorumConnections(const Consensus::LLMQParams& llmqParams, CConnman&
898883
LogPrint(BCLog::NET_NETCONN, debugMsg.c_str()); /* Continued */
899884
}
900885
connman.SetMasternodeQuorumNodes(llmqParams.type, pQuorumBaseBlockIndex->GetBlockHash(), connections);
901-
}
902-
if (!relayMembers.empty()) {
903-
connman.SetMasternodeQuorumRelayMembers(llmqParams.type, pQuorumBaseBlockIndex->GetBlockHash(), relayMembers);
886+
connman.SetMasternodeQuorumRelayMembers(llmqParams.type, pQuorumBaseBlockIndex->GetBlockHash(), connections);
904887
}
905888
return true;
906889
}

0 commit comments

Comments
 (0)