@@ -1731,7 +1731,7 @@ void CConnman::ProcessAddrFetch()
1731
1731
CAddress addr;
1732
1732
CSemaphoreGrant grant (*semOutbound, true );
1733
1733
if (grant) {
1734
- OpenNetworkConnection (addr, false , &grant, strDest.c_str (), true );
1734
+ OpenNetworkConnection (addr, false , &grant, strDest.c_str (), ConnectionType::ADDR_FETCH );
1735
1735
}
1736
1736
}
1737
1737
@@ -1777,7 +1777,7 @@ void CConnman::ThreadOpenConnections(const std::vector<std::string> connect)
1777
1777
for (const std::string& strAddr : connect)
1778
1778
{
1779
1779
CAddress addr (CService (), NODE_NONE);
1780
- OpenNetworkConnection (addr, false , nullptr , strAddr.c_str (), false , ConnectionType::MANUAL);
1780
+ OpenNetworkConnection (addr, false , nullptr , strAddr.c_str (), ConnectionType::MANUAL);
1781
1781
for (int i = 0 ; i < 10 && i < nLoop; i++)
1782
1782
{
1783
1783
if (!interruptNet.sleep_for (std::chrono::milliseconds (500 )))
@@ -1948,7 +1948,7 @@ void CConnman::ThreadOpenConnections(const std::vector<std::string> connect)
1948
1948
conn_type = ConnectionType::OUTBOUND;
1949
1949
}
1950
1950
1951
- OpenNetworkConnection (addrConnect, (int )setConnected.size () >= std::min (nMaxConnections - 1 , 2 ), &grant, nullptr , false , conn_type);
1951
+ OpenNetworkConnection (addrConnect, (int )setConnected.size () >= std::min (nMaxConnections - 1 , 2 ), &grant, nullptr , conn_type);
1952
1952
}
1953
1953
}
1954
1954
}
@@ -2023,7 +2023,7 @@ void CConnman::ThreadOpenAddedConnections()
2023
2023
}
2024
2024
tried = true ;
2025
2025
CAddress addr (CService (), NODE_NONE);
2026
- OpenNetworkConnection (addr, false , &grant, info.strAddedNode .c_str (), false , ConnectionType::MANUAL);
2026
+ OpenNetworkConnection (addr, false , &grant, info.strAddedNode .c_str (), ConnectionType::MANUAL);
2027
2027
if (!interruptNet.sleep_for (std::chrono::milliseconds (500 )))
2028
2028
return ;
2029
2029
}
@@ -2035,7 +2035,7 @@ void CConnman::ThreadOpenAddedConnections()
2035
2035
}
2036
2036
2037
2037
// if successful, this moves the passed grant to the constructed node
2038
- void CConnman::OpenNetworkConnection (const CAddress& addrConnect, bool fCountFailure , CSemaphoreGrant *grantOutbound, const char *pszDest, bool m_addr_fetch, ConnectionType conn_type)
2038
+ void CConnman::OpenNetworkConnection (const CAddress& addrConnect, bool fCountFailure , CSemaphoreGrant *grantOutbound, const char *pszDest, ConnectionType conn_type)
2039
2039
{
2040
2040
assert (conn_type != ConnectionType::INBOUND);
2041
2041
@@ -2062,8 +2062,6 @@ void CConnman::OpenNetworkConnection(const CAddress& addrConnect, bool fCountFai
2062
2062
return ;
2063
2063
if (grantOutbound)
2064
2064
grantOutbound->MoveTo (pnode->grantOutbound );
2065
- if (m_addr_fetch)
2066
- pnode->m_addr_fetch = true ;
2067
2065
2068
2066
m_msgproc->InitializeNode (pnode);
2069
2067
{
@@ -2742,6 +2740,7 @@ CNode::CNode(NodeId idIn, ServiceFlags nLocalServicesIn, int nMyStartingHeightIn
2742
2740
addr(addrIn),
2743
2741
addrBind(addrBindIn),
2744
2742
fFeeler(conn_type_in == ConnectionType::FEELER),
2743
+ m_addr_fetch(conn_type_in == ConnectionType::ADDR_FETCH),
2745
2744
m_manual_connection(conn_type_in == ConnectionType::MANUAL),
2746
2745
fInbound(conn_type_in == ConnectionType::INBOUND),
2747
2746
nKeyedNetGroup(nKeyedNetGroupIn),
0 commit comments