src/net.cpp
// if successful, this moves the passed grant to the constructed node
if successful, this moves the passed grant to the constructed node
if successful this moves the passed grant to the constructed node
bool OpenNetworkConnection(const CAddress& addrConnect, bool fCountFailure, CSemaphoreGrant *grantOutbound, const char *pszDest, bool fOneShot, bool fFeeler)
{
     Initiate outbound network connection
    boost::this_thread::interruption_point();
    if (!pszDest) {
        if (IsLocal(addrConnect) ||
            FindNode((CNetAddr)addrConnect) || CNode::IsBanned(addrConnect) ||
            FindNode(addrConnect.ToStringIPPort()))
            return false;
    } else if (FindNode(std::string(pszDest)))
        return false;
    CNode* pnode = ConnectNode(addrConnect, pszDest, fCountFailure);
    boost::this_thread::interruption_point();
    if (!pnode)
        return false;
    if (grantOutbound)
        grantOutbound->MoveTo(pnode->grantOutbound);
    pnode->fNetworkNode = true;
    if (fOneShot)
        pnode->fOneShot = true;
    if (fFeeler)
        pnode->fFeeler = true;
    return true;
}
bool OpenNetworkConnection ( const CAddress & addrConnect , bool fCountFailure , CSemaphoreGrant * grantOutbound , const char * pszDest , bool fOneShot , bool fFeeler ) { boost :: this_thread :: interruption_point ( ) ; if ( ! pszDest ) { if ( IsLocal ( addrConnect ) || FindNode ( ( CNetAddr ) addrConnect ) || CNode :: IsBanned ( addrConnect ) || FindNode ( addrConnect . ToStringIPPort ( ) ) ) return false ; } else if ( FindNode ( std :: string ( pszDest ) ) ) return false ; CNode * pnode = ConnectNode ( addrConnect , pszDest , fCountFailure ) ; boost :: this_thread :: interruption_point ( ) ; if ( ! pnode ) return false ; if ( grantOutbound ) grantOutbound -> MoveTo ( pnode -> grantOutbound ) ; pnode -> fNetworkNode = true ; if ( fOneShot ) pnode -> fOneShot = true ; if ( fFeeler ) pnode -> fFeeler = true ; return true ; }
if successful, this moves the passed grant to the constructed node
if successful this moves the passed grant to the constructed node
// // Initiate outbound network connection //