format: fix indentation (#5277)

## Issue being fixed or feature implemented
Indentation was wrong

## What was done?


## How Has This Been Tested?


## Breaking Changes


## Checklist:
<!--- Go over all the following points, and put an `x` in all the boxes
that apply. -->
- [ ] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have added or updated relevant unit/integration/functional/e2e
tests
- [ ] I have made corresponding changes to the documentation

**For repository code-owners and collaborators only**
- [x] I have assigned this pull request to a milestone
This commit is contained in:
PastaPastaPasta 2023-03-29 11:24:16 -05:00 committed by GitHub
parent 5456be6780
commit 376f78d8aa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2534,31 +2534,31 @@ void CConnman::ThreadOpenMasternodeConnections()
}
const auto& addr2 = dmn->pdmnState->addr;
if (connectedNodes.count(addr2) && !connectedProRegTxHashes.count(proRegTxHash)) {
// we probably connected to it before it became a masternode
// or maybe we are still waiting for mnauth
(void)ForNode(addr2, [&](CNode* pnode) {
if (pnode->nTimeFirstMessageReceived != 0 && GetSystemTimeInSeconds() - pnode->nTimeFirstMessageReceived > 5) {
// clearly not expecting mnauth to take that long even if it wasn't the first message
// we received (as it should normally), disconnect
LogPrint(BCLog::NET_NETCONN, "CConnman::%s -- dropping non-mnauth connection to %s, service=%s\n", _func_, proRegTxHash.ToString(), addr2.ToString(false));
pnode->fDisconnect = true;
return true;
}
return false;
});
// either way - it's not ready, skip it for now
// we probably connected to it before it became a masternode
// or maybe we are still waiting for mnauth
(void)ForNode(addr2, [&](CNode* pnode) {
if (pnode->nTimeFirstMessageReceived != 0 && GetSystemTimeInSeconds() - pnode->nTimeFirstMessageReceived > 5) {
// clearly not expecting mnauth to take that long even if it wasn't the first message
// we received (as it should normally), disconnect
LogPrint(BCLog::NET_NETCONN, "CConnman::%s -- dropping non-mnauth connection to %s, service=%s\n", _func_, proRegTxHash.ToString(), addr2.ToString(false));
pnode->fDisconnect = true;
return true;
}
return false;
});
// either way - it's not ready, skip it for now
continue;
}
if (!connectedNodes.count(addr2) && !IsMasternodeOrDisconnectRequested(addr2) && !connectedProRegTxHashes.count(proRegTxHash)) {
int64_t lastAttempt = mmetaman.GetMetaInfo(dmn->proTxHash)->GetLastOutboundAttempt();
// back off trying connecting to an address if we already tried recently
if (nANow - lastAttempt < chainParams.LLMQConnectionRetryTimeout()) {
continue;
}
if (!connectedNodes.count(addr2) && !IsMasternodeOrDisconnectRequested(addr2) && !connectedProRegTxHashes.count(proRegTxHash)) {
int64_t lastAttempt = mmetaman.GetMetaInfo(dmn->proTxHash)->GetLastOutboundAttempt();
// back off trying connecting to an address if we already tried recently
if (nANow - lastAttempt < chainParams.LLMQConnectionRetryTimeout()) {
continue;
}
ret.emplace_back(dmn);
}
ret.emplace_back(dmn);
}
}
}
return ret;
};