Skip to content

Commit 48a90c6

Browse files
author
MarcoFalke
committed
Merge bitcoin/bitcoin#24370: rpc, cli: describe quality/recency filtering in getnodeaddresses and -addrinfo
ce69084 cli: describe quality/recency filtering in -addrinfo (Jon Atack) 7c97561 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 ce69084 prayank23: reACK bitcoin/bitcoin@ce69084 Tree-SHA512: 82d23b15e64a99411eb8e70d7267a1b4f23182fabe072e824277569d9677e392b466be63f00e3d157d7db94bbe032d53f12ad4ab30b55b7b8a629c37d80d1d8c
2 parents e44423c + ce69084 commit 48a90c6

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/bitcoin-cli.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ static void SetupCliArgs(ArgsManager& argsman)
7575
"RPC generatetoaddress nblocks and maxtries arguments. Example: bitcoin-cli -generate 4 1000",
7676
DEFAULT_NBLOCKS, DEFAULT_MAX_TRIES),
7777
ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
78-
argsman.AddArg("-addrinfo", "Get the number of addresses known to the node, per network and total.", ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
78+
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);
7979
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);
8080
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);
8181

src/rpc/net.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -847,7 +847,9 @@ static RPCHelpMan setnetworkactive()
847847
static RPCHelpMan getnodeaddresses()
848848
{
849849
return RPCHelpMan{"getnodeaddresses",
850-
"\nReturn known addresses, which can potentially be used to find new nodes in the network.\n",
850+
"Return known addresses, after filtering for quality and recency.\n"
851+
"These can potentially be used to find new peers in the network.\n"
852+
"The total number of addresses known to the node may be higher.",
851853
{
852854
{"count", RPCArg::Type::NUM, RPCArg::Default{1}, "The maximum number of addresses to return. Specify 0 to return all known addresses."},
853855
{"network", RPCArg::Type::STR, RPCArg::DefaultHint{"all networks"}, "Return only addresses of the specified network. Can be one of: " + Join(GetNetworkNames(), ", ") + "."},

0 commit comments

Comments
 (0)