mirror of
https://github.com/dashpay/dash.git
synced 2024-12-25 20:12:57 +01:00
feat(llmq): avoid probing mns too often instead of using a tiny window to probe them (#4904)
We only call AddQuorumProbeConnections when a new quorum is intialized. It's possible to miss the 10 minute probe window if Contribute phase takes too long (when 2 blocks were mined in 10+ minutes). 50 minutes should be enough and probing once in 10 minutes should be safe.
This commit is contained in:
parent
a999023cbd
commit
268b8e97d3
@ -757,11 +757,11 @@ void CLLMQUtils::AddQuorumProbeConnections(const Consensus::LLMQParams& llmqPara
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
auto lastOutbound = mmetaman.GetMetaInfo(dmn->proTxHash)->GetLastOutboundSuccess();
|
auto lastOutbound = mmetaman.GetMetaInfo(dmn->proTxHash)->GetLastOutboundSuccess();
|
||||||
// re-probe after 50 minutes so that the "good connection" check in the DKG doesn't fail just because we're on
|
if (curTime - lastOutbound < 10 * 60) {
|
||||||
// the brink of timeout
|
// avoid re-probing nodes too often
|
||||||
if (curTime - lastOutbound > 50 * 60) {
|
continue;
|
||||||
probeConnections.emplace(dmn->proTxHash);
|
|
||||||
}
|
}
|
||||||
|
probeConnections.emplace(dmn->proTxHash);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!probeConnections.empty()) {
|
if (!probeConnections.empty()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user