Skip to content

Commit 5ee88b4

Browse files
committed
Clarify docs for requirements/handling of addnode/connect nodes
1 parent 57edc0b commit 5ee88b4

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/init.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -369,11 +369,11 @@ std::string HelpMessage(HelpMessageMode mode)
369369
strUsage += HelpMessageOpt("-txindex", strprintf(_("Maintain a full transaction index, used by the getrawtransaction rpc call (default: %u)"), DEFAULT_TXINDEX));
370370

371371
strUsage += HelpMessageGroup(_("Connection options:"));
372-
strUsage += HelpMessageOpt("-addnode=<ip>", _("Add a node to connect to and attempt to keep the connection open"));
372+
strUsage += HelpMessageOpt("-addnode=<ip>", _("Add a node to connect to and attempt to keep the connection open (see the `addnode` RPC command help for more info)"));
373373
strUsage += HelpMessageOpt("-banscore=<n>", strprintf(_("Threshold for disconnecting misbehaving peers (default: %u)"), DEFAULT_BANSCORE_THRESHOLD));
374374
strUsage += HelpMessageOpt("-bantime=<n>", strprintf(_("Number of seconds to keep misbehaving peers from reconnecting (default: %u)"), DEFAULT_MISBEHAVING_BANTIME));
375375
strUsage += HelpMessageOpt("-bind=<addr>", _("Bind to given address and always listen on it. Use [host]:port notation for IPv6"));
376-
strUsage += HelpMessageOpt("-connect=<ip>", _("Connect only to the specified node(s); -connect=0 disables automatic connections"));
376+
strUsage += HelpMessageOpt("-connect=<ip>", _("Connect only to the specified node(s); -connect=0 disables automatic connections (the rules for this peer are the same as for -addnode)"));
377377
strUsage += HelpMessageOpt("-discover", _("Discover own IP addresses (default: 1 when listening and no -externalip or -proxy)"));
378378
strUsage += HelpMessageOpt("-dns", _("Allow DNS lookups for -addnode, -seednode and -connect") + " " + strprintf(_("(default: %u)"), DEFAULT_NAME_LOOKUP));
379379
strUsage += HelpMessageOpt("-dnsseed", _("Query for peer addresses via DNS lookup, if low on addresses (default: 1 unless -connect used)"));

src/rpc/net.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,8 @@ UniValue addnode(const JSONRPCRequest& request)
201201
"addnode \"node\" \"add|remove|onetry\"\n"
202202
"\nAttempts to add or remove a node from the addnode list.\n"
203203
"Or try a connection to a node once.\n"
204+
"Nodes added using addnode (or -connect) are protected from DoS disconnection and are not required to be\n"
205+
"full nodes/support SegWit as other outbound peers are (though such peers will not be synced from).\n"
204206
"\nArguments:\n"
205207
"1. \"node\" (string, required) The node (see getpeerinfo for nodes)\n"
206208
"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"

0 commit comments

Comments
 (0)