File tree 1 file changed +5
-7
lines changed 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -3507,9 +3507,6 @@ void CConnman::ThreadOpenConnections(const std::vector<std::string> connect, CDe
3507
3507
std::tie (addr, addr_last_try) = addrman.Select (false , preferred_net);
3508
3508
}
3509
3509
3510
- auto dmn = mnList.GetMNByService (addr);
3511
- bool isMasternode = dmn != nullptr ;
3512
-
3513
3510
// Require outbound IPv4/IPv6 connections, other than feelers, to be to distinct network groups
3514
3511
if (!fFeeler && outbound_ipv46_peer_netgroups.count (m_netgroupman.GetGroup (addr))) {
3515
3512
continue ;
@@ -3520,10 +3517,6 @@ void CConnman::ThreadOpenConnections(const std::vector<std::string> connect, CDe
3520
3517
break ;
3521
3518
}
3522
3519
3523
- // don't try to connect to masternodes that we already have a connection to (most likely inbound)
3524
- if (isMasternode && setConnectedMasternodes.count (dmn->proTxHash ))
3525
- continue ;
3526
-
3527
3520
// don't connect to ourselves
3528
3521
if (addr.GetPort () == GetListenPort () && IsLocal (addr)) {
3529
3522
break ;
@@ -3566,6 +3559,11 @@ void CConnman::ThreadOpenConnections(const std::vector<std::string> connect, CDe
3566
3559
continue ;
3567
3560
}
3568
3561
3562
+ // don't try to connect to masternodes that we already have a connection to (most likely inbound)
3563
+ if (auto dmn = mnList.GetMNByService (addr); dmn && setConnectedMasternodes.count (dmn->proTxHash )) {
3564
+ continue ;
3565
+ }
3566
+
3569
3567
addrConnect = addr;
3570
3568
break ;
3571
3569
}
You can’t perform that action at this time.
0 commit comments