aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2022-02-21 16:44:17 +0100
committerMarcoFalke <falke.marco@gmail.com>2022-02-21 16:44:22 +0100
commit48a90c61e2269e6de78416001dd28bf3e12d9ebe (patch)
treef30781fb38c09a7c685c980d0d86a49a3cf132c6 /src
parente44423c9d364eba9199b7097eeb20b0dfa91284e (diff)
parentce690847b69eb80b0232f818152dbb1db7c4c61a (diff)
downloadbitcoin-48a90c61e2269e6de78416001dd28bf3e12d9ebe.tar.xz
Merge bitcoin/bitcoin#24370: rpc, cli: describe quality/recency filtering in getnodeaddresses and -addrinfo
ce690847b69eb80b0232f818152dbb1db7c4c61a cli: describe quality/recency filtering in -addrinfo (Jon Atack) 7c975614c0fc6ff2084a1708a4c1f0368a4bc98f rpc: describe quality/recency filtering in getnodeaddresses (Jon Atack) Pull request description: Addresses #24278. ``` $ bitcoin-cli help getnodeaddresses getnodeaddresses ( count "network" ) Return known addresses, after filtering for quality and recency. These can potentially be used to find new peers in the network. The total number of addresses known to the node may be higher. ``` ``` $ bitcoin-cli -help | grep -A3 addrinfo -addrinfo Get the number of addresses known to the node, per network and total, after filtering for quality and recency. The total number of addresses known to the node may be higher. ``` ACKs for top commit: mzumsande: Thanks, Code Review ACK ce690847b69eb80b0232f818152dbb1db7c4c61a prayank23: reACK https://github.com/bitcoin/bitcoin/pull/24370/commits/ce690847b69eb80b0232f818152dbb1db7c4c61a Tree-SHA512: 82d23b15e64a99411eb8e70d7267a1b4f23182fabe072e824277569d9677e392b466be63f00e3d157d7db94bbe032d53f12ad4ab30b55b7b8a629c37d80d1d8c
Diffstat (limited to 'src')
-rw-r--r--src/bitcoin-cli.cpp2
-rw-r--r--src/rpc/net.cpp4
2 files changed, 4 insertions, 2 deletions
diff --git a/src/bitcoin-cli.cpp b/src/bitcoin-cli.cpp
index 8062152bb9..874e38752a 100644
--- a/src/bitcoin-cli.cpp
+++ b/src/bitcoin-cli.cpp
@@ -75,7 +75,7 @@ static void SetupCliArgs(ArgsManager& argsman)
"RPC generatetoaddress nblocks and maxtries arguments. Example: bitcoin-cli -generate 4 1000",
DEFAULT_NBLOCKS, DEFAULT_MAX_TRIES),
ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
- argsman.AddArg("-addrinfo", "Get the number of addresses known to the node, per network and total.", ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
+ argsman.AddArg("-addrinfo", "Get the number of addresses known to the node, per network and total, after filtering for quality and recency. The total number of addresses known to the node may be higher.", ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
argsman.AddArg("-getinfo", "Get general information from the remote server. Note that unlike server-side RPC calls, the results of -getinfo is the result of multiple non-atomic requests. Some entries in the result may represent results from different states (e.g. wallet balance may be as of a different block from the chain state reported)", ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
argsman.AddArg("-netinfo", "Get network peer connection information from the remote server. An optional integer argument from 0 to 4 can be passed for different peers listings (default: 0). Pass \"help\" for detailed help documentation.", ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
diff --git a/src/rpc/net.cpp b/src/rpc/net.cpp
index 3d7c00edfc..4d3e3e81d4 100644
--- a/src/rpc/net.cpp
+++ b/src/rpc/net.cpp
@@ -847,7 +847,9 @@ static RPCHelpMan setnetworkactive()
static RPCHelpMan getnodeaddresses()
{
return RPCHelpMan{"getnodeaddresses",
- "\nReturn known addresses, which can potentially be used to find new nodes in the network.\n",
+ "Return known addresses, after filtering for quality and recency.\n"
+ "These can potentially be used to find new peers in the network.\n"
+ "The total number of addresses known to the node may be higher.",
{
{"count", RPCArg::Type::NUM, RPCArg::Default{1}, "The maximum number of addresses to return. Specify 0 to return all known addresses."},
{"network", RPCArg::Type::STR, RPCArg::DefaultHint{"all networks"}, "Return only addresses of the specified network. Can be one of: " + Join(GetNetworkNames(), ", ") + "."},