@@ -917,7 +917,7 @@ bool CConnman::AttemptToEvictConnection()
917917 .m_is_local = node->addr .IsLocal (),
918918 .m_network = node->ConnectedThroughNetwork (),
919919 .m_noban = node->HasPermission (NetPermissionFlags::NoBan),
920- .m_conn_type = node->m_conn_type ,
920+ .m_conn_type = node->GetConnectionType () ,
921921 };
922922 vEvictionCandidates.push_back (candidate);
923923 }
@@ -1092,7 +1092,7 @@ bool CConnman::AddConnection(const std::string& address, ConnectionType conn_typ
10921092
10931093 // Count existing connections
10941094 int existing_connections = WITH_LOCK (m_nodes_mutex,
1095- return std::count_if (m_nodes.begin (), m_nodes.end (), [conn_type](CNode* node) { return node->m_conn_type == conn_type; }););
1095+ return std::count_if (m_nodes.begin (), m_nodes.end (), [conn_type](CNode* node) { return node->GetConnectionType () == conn_type; }););
10961096
10971097 // Max connections of specified type already exist
10981098 if (max_connections != std::nullopt && existing_connections >= max_connections) return false ;
@@ -1722,7 +1722,7 @@ void CConnman::ThreadOpenConnections(const std::vector<std::string> connect)
17221722 if (pnode->IsBlockOnlyConn ()) nOutboundBlockRelay++;
17231723
17241724 // Make sure our persistent outbound slots belong to different netgroups.
1725- switch (pnode->m_conn_type ) {
1725+ switch (pnode->GetConnectionType () ) {
17261726 // We currently don't take inbound connections into account. Since they are
17271727 // free to make, an attacker could make them to prevent us from connecting to
17281728 // certain peers.
0 commit comments