Supporting parameter "h" and "?" in -netinfo. #27830

pull Brotcrunsher wants to merge 1 commits into bitcoin:master from Brotcrunsher:hnetinfo changing 1 files +1 −1
  1. Brotcrunsher commented at 10:08 PM on June 5, 2023: contributor

    The main -help argument supports these two as well, so we might as well behave the same here.

  2. Supporting parameter "h" and "?" in -netinfo. The main -help argument supports these two as well, so we might as well behave the same here. 4549d98b3b
  3. DrahtBot commented at 10:08 PM on June 5, 2023: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    Concept NACK luke-jr

    If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

  4. dimitaracev commented at 7:05 PM on June 10, 2023: contributor

    Honestly I would just create a function that does the check, in case we use -h and -? in other arguments. A few changes in the bitcoin-cli.cpp are required as well since only -help is mentioned e.g on line 90 and 636.

  5. luke-jr changes_requested
  6. luke-jr commented at 12:20 AM on July 3, 2023: member

    Concept NACK. This seems to be for bitcoin-cli -netinfo h, which is weird and there's no reason to expect that to work.

  7. in src/bitcoin-cli.cpp:1178 in 4549d98b3b
    1174 | @@ -1175,7 +1175,7 @@ static int CommandLineRPC(int argc, char *argv[])
    1175 |          if (gArgs.IsArgSet("-getinfo")) {
    1176 |              rh.reset(new GetinfoRequestHandler());
    1177 |          } else if (gArgs.GetBoolArg("-netinfo", false)) {
    1178 | -            if (!args.empty() && args.at(0) == "help") {
    1179 | +            if (!args.empty() && (args.at(0) == "help" || args.at(0) == "h" || args.at(0) == "?")) {
    


    jonatack commented at 9:57 PM on July 5, 2023:

    I don't have a strong opinion for or against on this proposed change, but the documentation for this user interface is provided by bitcoin-cli -help

    $ ./src/bitcoin-cli -help | grep -A4 netinfo 
      -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.
    

    and so this change would involve updating that help documentation in this file at line 93

        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);
    

    to something like Pass "help", "h" or "?" for detailed help documentation.

  8. Brotcrunsher closed this on Jul 9, 2023

  9. bitcoin locked this on Jul 8, 2024

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: 2026-04-26 06:13 UTC

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