mirror of
https://github.com/dashpay/dash.git
synced 2024-12-25 12:02:48 +01:00
fix: Handle quorum watch connections correctly (#4933)
We add them via EnsureQuorumConnections+ThreadOpenMasternodeConnections so they are clearly masternode connections and they are dropped regularly which is annoying. But also, we don't want every masternode connection to be a qwatch one, we want only the ones we added via that algo.
This commit is contained in:
parent
0ca9fc087c
commit
f7427d9c13
@ -61,6 +61,9 @@ void CMasternodeUtils::ProcessMasternodeConnections(CConnman& connman)
|
||||
} else if (GetSystemTimeInSeconds() - pnode->nTimeConnected < 5) {
|
||||
// non-verified, give it some time to verify itself
|
||||
return;
|
||||
} else if (pnode->qwatch) {
|
||||
// keep watching nodes
|
||||
return;
|
||||
}
|
||||
// we're not disconnecting masternode probes for at least a few seconds
|
||||
if (pnode->m_masternode_probe_connection && GetSystemTimeInSeconds() - pnode->nTimeConnected < 5) return;
|
||||
|
@ -2716,7 +2716,7 @@ bool static ProcessMessage(CNode* pfrom, const std::string& msg_type, CDataStrea
|
||||
// Tell our peer that he should send us CoinJoin queue messages
|
||||
connman->PushMessage(pfrom, msgMaker.Make(NetMsgType::SENDDSQUEUE, true));
|
||||
|
||||
if (llmq::CLLMQUtils::IsWatchQuorumsEnabled() && !pfrom->m_masternode_connection) {
|
||||
if (llmq::CLLMQUtils::IsWatchQuorumsEnabled() && connman->IsMasternodeQuorumNode(pfrom)) {
|
||||
connman->PushMessage(pfrom, msgMaker.Make(NetMsgType::QWATCH));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user