diff --git a/src/net.h b/src/net.h index fb67c35ea4b87..8e85aac29fd4d 100644 --- a/src/net.h +++ b/src/net.h @@ -457,7 +457,6 @@ friend class CNode; void WakeMessageHandler(); void WakeSelect(); - void DisconnectNodes(); /** Attempts to obfuscate tx time through exponentially distributed emitting. Works assuming that a single interval is used. @@ -482,6 +481,7 @@ friend class CNode; void ThreadOpenConnections(std::vector connect); void ThreadMessageHandler(); void AcceptConnection(const ListenSocket& hListenSocket); + void DisconnectNodes(); void NotifyNumConnectionsChanged(); void InactivityCheck(CNode *pnode); bool GenerateSelectSet(std::set &recv_set, std::set &send_set, std::set &error_set); diff --git a/src/rpc/net.cpp b/src/rpc/net.cpp index 312938e54242d..d2181bc3946d4 100644 --- a/src/rpc/net.cpp +++ b/src/rpc/net.cpp @@ -40,7 +40,6 @@ UniValue getconnectioncount(const JSONRPCRequest& request) if(!g_connman) throw JSONRPCError(RPC_CLIENT_P2P_DISABLED, "Error: Peer-to-peer functionality missing or disabled"); - g_connman->DisconnectNodes(); return (int)g_connman->GetNodeCount(CConnman::CONNECTIONS_ALL); } @@ -127,8 +126,6 @@ UniValue getpeerinfo(const JSONRPCRequest& request) if(!g_connman) throw JSONRPCError(RPC_CLIENT_P2P_DISABLED, "Error: Peer-to-peer functionality missing or disabled"); - g_connman->DisconnectNodes(); - std::vector vstats; g_connman->GetNodeStats(vstats); @@ -470,10 +467,6 @@ UniValue getnetworkinfo(const JSONRPCRequest& request) + HelpExampleRpc("getnetworkinfo", "") ); - if (g_connman) { - g_connman->DisconnectNodes(); - } - LOCK(cs_main); UniValue obj(UniValue::VOBJ); obj.push_back(Pair("version", CLIENT_VERSION));