mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-20 14:05:23 +01:00
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. However, they should be seen as regular connections from Addrman when it comes to netgroup diversity check, since the same rationale can be applied. Note, this has nothing to do with how we connect to MANUAL connections: we connect to them unconditionally.
This commit is contained in:
parent
3faae99c3d
commit
72e8ffd7f8
1 changed files with 1 additions and 3 deletions
|
@ -1727,14 +1727,12 @@ void CConnman::ThreadOpenConnections(const std::vector<std::string> connect)
|
|||
// free to make, an attacker could make them to prevent us from connecting to
|
||||
// certain peers.
|
||||
case ConnectionType::INBOUND:
|
||||
// Manually selected connections should not affect how we select outbound
|
||||
// peers from addrman.
|
||||
case ConnectionType::MANUAL:
|
||||
// Short-lived outbound connections should not affect how we select outbound
|
||||
// peers from addrman.
|
||||
case ConnectionType::ADDR_FETCH:
|
||||
case ConnectionType::FEELER:
|
||||
break;
|
||||
case ConnectionType::MANUAL:
|
||||
case ConnectionType::OUTBOUND_FULL_RELAY:
|
||||
case ConnectionType::BLOCK_RELAY:
|
||||
setConnected.insert(m_netgroupman.GetGroup(pnode->addr));
|
||||
|
|
Loading…
Add table
Reference in a new issue