Browse Source

Make docs for addnode/disconnectnode correct for HACs #376

dev
Duke 2 weeks ago
parent
commit
18e3364bc2
  1. 10
      src/rpc/net.cpp

10
src/rpc/net.cpp

@ -31,6 +31,8 @@
#include <boost/foreach.hpp>
#include <univalue.h>
extern uint16_t ASSETCHAINS_P2PPORT,ASSETCHAINS_RPCPORT;
using namespace std;
using namespace hush;
@ -276,8 +278,8 @@ UniValue addnode(const UniValue& params, bool fHelp, const CPubKey& mypk)
"1. \"node\" (string, required) The node (see getpeerinfo for nodes)\n"
"2. \"command\" (string, required) 'add' to add a node to the list, 'remove' to remove a node from the list, 'onetry' to try a connection to the node once\n"
"\nExamples:\n"
+ HelpExampleCli("addnode", "\"192.168.0.6:18030\" \"onetry\"")
+ HelpExampleRpc("addnode", "\"192.168.0.6:18030\", \"onetry\"")
+ HelpExampleCli("addnode", "\"192.168.0.6:" + to_string(ASSETCHAINS_P2PPORT) + "\" \"onetry\"")
+ HelpExampleRpc("addnode", "\"192.168.0.6:" + to_string(ASSETCHAINS_P2PPORT) + "\", \"onetry\"")
);
string strNode = params[0].get_str();
@ -320,8 +322,8 @@ UniValue disconnectnode(const UniValue& params, bool fHelp, const CPubKey& mypk)
"\nArguments:\n"
"1. \"node\" (string, required) The node (see getpeerinfo for nodes)\n"
"\nExamples:\n"
+ HelpExampleCli("disconnectnode", "\"192.168.0.6:18030\"")
+ HelpExampleRpc("disconnectnode", "\"192.168.0.6:18030\"")
+ HelpExampleCli("disconnectnode", "\"192.168.0.6:" + to_string(ASSETCHAINS_P2PPORT) + "\"")
+ HelpExampleRpc("disconnectnode", "\"192.168.0.6:" + to_string(ASSETCHAINS_P2PPORT) + "\"")
);
CNode* pNode = FindNode(params[0].get_str());

Loading…
Cancel
Save