Changeset View
Changeset View
Standalone View
Standalone View
src/rpc/net.cpp
Show First 20 Lines • Show All 350 Lines • ▼ Show 20 Lines | static UniValue addnode(const Config &config, const JSONRPCRequest &request) { | ||||
} | } | ||||
if ((strCommand == "add") && (!node.connman->AddNode(strNode))) { | if ((strCommand == "add") && (!node.connman->AddNode(strNode))) { | ||||
throw JSONRPCError(RPC_CLIENT_NODE_ALREADY_ADDED, | throw JSONRPCError(RPC_CLIENT_NODE_ALREADY_ADDED, | ||||
"Error: Node already added"); | "Error: Node already added"); | ||||
} else if ((strCommand == "remove") && | } else if ((strCommand == "remove") && | ||||
(!node.connman->RemoveAddedNode(strNode))) { | (!node.connman->RemoveAddedNode(strNode))) { | ||||
throw JSONRPCError(RPC_CLIENT_NODE_NOT_ADDED, | throw JSONRPCError(RPC_CLIENT_NODE_NOT_ADDED, | ||||
"Error: Node has not been added."); | "Error: Node could not be removed. It has not been " | ||||
"added previously."); | |||||
} | } | ||||
return NullUniValue; | return NullUniValue; | ||||
} | } | ||||
static UniValue disconnectnode(const Config &config, | static UniValue disconnectnode(const Config &config, | ||||
const JSONRPCRequest &request) { | const JSONRPCRequest &request) { | ||||
RPCHelpMan{ | RPCHelpMan{ | ||||
▲ Show 20 Lines • Show All 699 Lines • Show Last 20 Lines |