mirror of
https://github.com/dashpay/dash.git
synced 2024-12-28 13:32:47 +01:00
Fix addnode "onetry": Connect with OpenNetworkConnection
This commit is contained in:
parent
605d5b5558
commit
b641c9cd21
@ -41,9 +41,6 @@ using namespace boost;
|
|||||||
|
|
||||||
static const int MAX_OUTBOUND_CONNECTIONS = 8;
|
static const int MAX_OUTBOUND_CONNECTIONS = 8;
|
||||||
|
|
||||||
bool OpenNetworkConnection(const CAddress& addrConnect, CSemaphoreGrant *grantOutbound = NULL, const char *strDest = NULL, bool fOneShot = false);
|
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Global state variables
|
// Global state variables
|
||||||
//
|
//
|
||||||
|
@ -49,6 +49,7 @@ void AddressCurrentlyConnected(const CService& addr);
|
|||||||
CNode* FindNode(const CNetAddr& ip);
|
CNode* FindNode(const CNetAddr& ip);
|
||||||
CNode* FindNode(const CService& ip);
|
CNode* FindNode(const CService& ip);
|
||||||
CNode* ConnectNode(CAddress addrConnect, const char *strDest = NULL);
|
CNode* ConnectNode(CAddress addrConnect, const char *strDest = NULL);
|
||||||
|
bool OpenNetworkConnection(const CAddress& addrConnect, CSemaphoreGrant *grantOutbound = NULL, const char *strDest = NULL, bool fOneShot = false);
|
||||||
void MapPort(bool fUseUPnP);
|
void MapPort(bool fUseUPnP);
|
||||||
unsigned short GetListenPort();
|
unsigned short GetListenPort();
|
||||||
bool BindListenPort(const CService &bindAddr, std::string& strError=REF(std::string()));
|
bool BindListenPort(const CService &bindAddr, std::string& strError=REF(std::string()));
|
||||||
|
@ -166,7 +166,7 @@ Value addnode(const Array& params, bool fHelp)
|
|||||||
if (strCommand == "onetry")
|
if (strCommand == "onetry")
|
||||||
{
|
{
|
||||||
CAddress addr;
|
CAddress addr;
|
||||||
ConnectNode(addr, strNode.c_str());
|
OpenNetworkConnection(addr, NULL, strNode.c_str());
|
||||||
return Value::null;
|
return Value::null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user