From 18e3364bc260e19cf2705c670d6902ee83375248 Mon Sep 17 00:00:00 2001 From: Duke Date: Fri, 19 Apr 2024 07:32:12 -0400 Subject: [PATCH] Make docs for addnode/disconnectnode correct for HACs #376 --- src/rpc/net.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/rpc/net.cpp b/src/rpc/net.cpp index de61c3eff..096f7b558 100644 --- a/src/rpc/net.cpp +++ b/src/rpc/net.cpp @@ -31,6 +31,8 @@ #include #include +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());