The main -help argument supports these two as well, so we might as well behave the same here.
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-
Brotcrunsher commented at 10:08 PM on June 5, 2023: contributor
-
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
-
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.
-
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
-hand-?in other arguments. A few changes in thebitcoin-cli.cppare required as well since only-helpis mentioned e.g on line 90 and 636. - luke-jr changes_requested
-
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. -
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.Brotcrunsher closed this on Jul 9, 2023bitcoin locked this on Jul 8, 2024Contributors
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
More mirrored repositories can be found on mirror.b10c.me