Skip to content

Commit

Permalink
Merge bitcoin/bitcoin#27863: net: do not break when addr is not f…
Browse files Browse the repository at this point in the history
…rom a distinct network group

5fa4055 net: do not `break` when `addr` is not from a distinct network group (brunoerg)

Pull request description:

  When the address is from a network group we already caught,
  do a `continue` and try to find another address until conditions
  are met or we reach the limit (`nTries`).

ACKs for top commit:
  amitiuttarwar:
    utACK 5fa4055
  achow101:
    ACK 5fa4055
  mzumsande:
    utACK 5fa4055

Tree-SHA512: 225bb6df450b46960db934983c583e862d1a17bacfc46d3657a0eb25a0204e106e8cd18de36764e210e0a92489ab4b5773437e4a641c9b455bde74ff8a041787
  • Loading branch information
achow101 committed Jun 29, 2023
2 parents 561915f + 5fa4055 commit 54ba330
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/net.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1844,7 +1844,7 @@ void CConnman::ThreadOpenConnections(const std::vector<std::string> connect)

// Require outbound IPv4/IPv6 connections, other than feelers, to be to distinct network groups
if (!fFeeler && outbound_ipv46_peer_netgroups.count(m_netgroupman.GetGroup(addr))) {
break;
continue;
}

// if we selected an invalid or local address, restart
Expand Down

0 comments on commit 54ba330

Please sign in to comment.