mirror of
https://github.com/dashpay/dash.git
synced 2024-12-25 03:52:49 +01:00
Fix shadowing of "addr"
This commit is contained in:
parent
5bebdda71f
commit
93b1b3d732
12
src/net.cpp
12
src/net.cpp
@ -2069,19 +2069,19 @@ void CConnman::ThreadOpenMasternodeConnections()
|
||||
std::vector<CService> pending;
|
||||
for (const auto& group : masternodeQuorumNodes) {
|
||||
for (const auto& p : group.second) {
|
||||
auto& addr = p.first;
|
||||
auto& addr2 = p.first;
|
||||
auto& proRegTxHash = p.second;
|
||||
if (!connectedNodes.count(addr) && !IsMasternodeOrDisconnectRequested(addr) && !connectedProRegTxHashes.count(proRegTxHash)) {
|
||||
pending.emplace_back(addr);
|
||||
if (!connectedNodes.count(addr2) && !IsMasternodeOrDisconnectRequested(addr2) && !connectedProRegTxHashes.count(proRegTxHash)) {
|
||||
pending.emplace_back(addr2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!vPendingMasternodes.empty()) {
|
||||
auto addr = vPendingMasternodes.front();
|
||||
auto addr2 = vPendingMasternodes.front();
|
||||
vPendingMasternodes.erase(vPendingMasternodes.begin());
|
||||
if (!connectedNodes.count(addr) && !IsMasternodeOrDisconnectRequested(addr)) {
|
||||
pending.emplace_back(addr);
|
||||
if (!connectedNodes.count(addr2) && !IsMasternodeOrDisconnectRequested(addr2)) {
|
||||
pending.emplace_back(addr2);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user