rpc, cli: describe quality/recency filtering in getnodeaddresses and -addrinfo #24370

pull jonatack wants to merge 2 commits into bitcoin:master from jonatack:mention-quality-filter-in-getnodeaddresses-and-addrinfo changing 2 files +4 −2
  1. jonatack commented at 2:27 pm on February 17, 2022: member

    Addresses #24278.

    0$ bitcoin-cli help getnodeaddresses
    1getnodeaddresses ( count "network" )
    2
    3Return known addresses, after filtering for quality and recency.
    4These can potentially be used to find new peers in the network.
    5The total number of addresses known to the node may be higher.
    
    0$ bitcoin-cli -help | grep -A3 addrinfo
    1  -addrinfo
    2       Get the number of addresses known to the node, per network and total,
    3       after filtering for quality and recency. The total number of
    4       addresses known to the node may be higher.
    
  2. DrahtBot added the label RPC/REST/ZMQ on Feb 17, 2022
  3. DrahtBot added the label Utils/log/libs on Feb 17, 2022
  4. in src/bitcoin-cli.cpp:73 in c89cdd8da4 outdated
    69@@ -70,7 +70,7 @@ static void SetupCliArgs(ArgsManager& argsman)
    70     argsman.AddArg("-conf=<file>", strprintf("Specify configuration file. Relative paths will be prefixed by datadir location. (default: %s)", BITCOIN_CONF_FILENAME), ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
    71     argsman.AddArg("-datadir=<dir>", "Specify data directory", ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
    72     argsman.AddArg("-generate", strprintf("Generate blocks immediately, equivalent to RPC getnewaddress followed by RPC generatetoaddress. Optional positional integer arguments are number of blocks to generate (default: %s) and maximum iterations to try (default: %s), equivalent to RPC generatetoaddress nblocks and maxtries arguments. Example: bitcoin-cli -generate 4 1000", DEFAULT_NBLOCKS, DEFAULT_MAX_TRIES), ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
    73-    argsman.AddArg("-addrinfo", "Get the number of addresses known to the node, per network and total.", ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
    74+    argsman.AddArg("-addrinfo", "Get the number of addresses known to the node, per network and total. These are filtered for quality, so the total may be lower than the numbers in the debug log.", ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
    


    mzumsande commented at 6:28 pm on February 17, 2022:
    Not sure if it’s good practice to refer to the debug log in RPC helps. How about something like “Get the quality-filtered number of addresses known to the node, per network and total. The total number of addresses known to the node may be higher.” (and something similar below)

    jonatack commented at 7:10 pm on February 17, 2022:
    Good point.

    jonatack commented at 7:12 pm on February 17, 2022:
    Maybe also s/quality/quality and recency/

    jonatack commented at 10:25 pm on February 17, 2022:
    Thanks, done.
  5. mzumsande commented at 6:30 pm on February 17, 2022: member
    Concept ACK, mentioning this distinction makes sense to me.
  6. jonatack renamed this:
    doc: mention quality filter in getnodeaddresses and -addrinfo helps
    doc: mention quality/recency filtering in getnodeaddresses and -addrinfo helps
    on Feb 17, 2022
  7. jonatack force-pushed on Feb 17, 2022
  8. unknown approved
  9. jarolrod commented at 7:04 am on February 18, 2022: member

    ACK 2ed23881d9e51bfff06fe89ffdb396bd1577bff8

    0./src/bitcoin-cli help getnodeaddresses
    1getnodeaddresses ( count "network" )
    2
    3Return known addresses, after filtering for quality and recency.
    4These can potentially be used to find new peers in the network.
    5The total number of addresses known to the node may be higher.
    6
    7...
    
    0./src/bitcoin-cli -help | grep -A3 addrinfo
    1  -addrinfo
    2       Get the number of addresses known to the node, per network and total,
    3       after filtering for quality and recency. The total number of
    4       addresses known to the node may be higher.
    
  10. theStack approved
  11. theStack commented at 8:04 pm on February 20, 2022: member
    ACK 2ed23881d9e51bfff06fe89ffdb396bd1577bff8
  12. DrahtBot added the label Needs rebase on Feb 21, 2022
  13. rpc: describe quality/recency filtering in getnodeaddresses
    Co-authored-by: Martin Zumsande <mzumsande@gmail.com>
    7c975614c0
  14. cli: describe quality/recency filtering in -addrinfo
    Co-authored-by: Martin Zumsande <mzumsande@gmail.com>
    ce690847b6
  15. jonatack renamed this:
    doc: mention quality/recency filtering in getnodeaddresses and -addrinfo helps
    rpc, cli: describe quality/recency filtering in getnodeaddresses and -addrinfo
    on Feb 21, 2022
  16. jonatack commented at 1:37 pm on February 21, 2022: member
    Rebased.
  17. jonatack force-pushed on Feb 21, 2022
  18. unknown approved
  19. MarcoFalke commented at 1:52 pm on February 21, 2022: member
    @mzumsande Did you want to re-review this before merge, since you left a comment? If not, then it can be merged now.
  20. DrahtBot removed the label Needs rebase on Feb 21, 2022
  21. mzumsande commented at 3:23 pm on February 21, 2022: member

    Did you want to re-review this before merge, since you left a comment? If not, then it can be merged now.

    Thanks, Code Review ACK ce690847b69eb80b0232f818152dbb1db7c4c61a

  22. MarcoFalke merged this on Feb 21, 2022
  23. MarcoFalke closed this on Feb 21, 2022

  24. jonatack deleted the branch on Feb 21, 2022
  25. sidhujag referenced this in commit f24cfd11ee on Feb 22, 2022
  26. DrahtBot locked this on Feb 21, 2023

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-07-05 19:13 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me