diff options
author | Cory Fields <cory-nospam-@coryfields.com> | 2016-04-16 15:59:10 -0400 |
---|---|---|
committer | Cory Fields <cory-nospam-@coryfields.com> | 2016-09-08 12:06:24 -0400 |
commit | b1a5f4320878e34eb998737dce333270dd83e436 (patch) | |
tree | 2b1a9a94fb1008b3e4b1936fb55d3e83cb998aac /src/rpc | |
parent | 02137f11e2ea5d153f433493639730587836a1e3 (diff) |
net: move OpenNetworkConnection into CConnman
Diffstat (limited to 'src/rpc')
-rw-r--r-- | src/rpc/net.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/rpc/net.cpp b/src/rpc/net.cpp index 840bfd5a24..edf33c70be 100644 --- a/src/rpc/net.cpp +++ b/src/rpc/net.cpp @@ -214,12 +214,15 @@ UniValue addnode(const UniValue& params, bool fHelp) + HelpExampleRpc("addnode", "\"192.168.0.6:8333\", \"onetry\"") ); + if(!g_connman) + throw JSONRPCError(RPC_CLIENT_P2P_DISABLED, "Error: Peer-to-peer functionality missing or disabled"); + string strNode = params[0].get_str(); if (strCommand == "onetry") { CAddress addr; - OpenNetworkConnection(addr, false, NULL, strNode.c_str()); + g_connman->OpenNetworkConnection(addr, false, NULL, strNode.c_str()); return NullUniValue; } |