Skip to content

Commit 513d52b

Browse files
committed
p2p: Account for MANUAL conns when diversifying persistent outbound conns
Previously, we would make connections to peer from the netgroups to which our MANUAL outbound connections belong. Note, this doesn't affect how we choose MANUAL connections, because this check does not apply to them.
1 parent 916d8f0 commit 513d52b

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/net.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1914,16 +1914,14 @@ void CConnman::ThreadOpenConnections(const std::vector<std::string> connect)
19141914
// free to make, an attacker could make them to prevent us from connecting to
19151915
// certain peers.
19161916
case ConnectionType::INBOUND:
1917-
// Manually selected connections should not affect how we select outbound
1918-
// peers from addrman.
1919-
case ConnectionType::MANUAL:
19201917
// Short-lived outbound connections should not affect how we select outbound
19211918
// peers from addrman.
19221919
case ConnectionType::ADDR_FETCH:
19231920
// Short-lived outbound connections should not affect how we select outbound
19241921
// peers from addrman.
19251922
case ConnectionType::FEELER:
19261923
break;
1924+
case ConnectionType::MANUAL:
19271925
case ConnectionType::OUTBOUND_FULL_RELAY:
19281926
case ConnectionType::BLOCK_RELAY:
19291927
setConnected.insert(pnode->addr.GetGroup(addrman.GetAsmap()));

0 commit comments

Comments
 (0)