Skip to content

Commit d32528e

Browse files
author
MarcoFalke
committed
Merge #12331: Docs: Properly alphabetize output of CLI --help option.
d3e4675 Properly alphabetize output of CLI --help option. (murrayn) Pull request description: The --help output of bitcoind, bitcoin-cli, bitcoin-tx, qt/bitcoin-qt, et al. is only about 90% alphabetized by option, which is kind of sloppy and occasionally misleading. This change (mostly) organizes the output alphabetically. Tree-SHA512: 3029900dbe99f03397c1cbdb5e4ac09a13bc99bafe73c6855097206e4cdd9ad70d0b5cedb5e1e520005c3e9ef1c4cd32bb9d8c98ce6918d8434fec8bf06e56c8
2 parents 85123be + d3e4675 commit d32528e

File tree

6 files changed

+35
-35
lines changed

6 files changed

+35
-35
lines changed

src/bitcoin-cli.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,15 @@ std::string HelpMessageCli()
4040
strUsage += HelpMessageOpt("-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)"));
4141
AppendParamsHelpMessages(strUsage);
4242
strUsage += HelpMessageOpt("-named", strprintf(_("Pass named instead of positional arguments (default: %s)"), DEFAULT_NAMED));
43+
strUsage += HelpMessageOpt("-rpcclienttimeout=<n>", strprintf(_("Timeout in seconds during HTTP requests, or 0 for no timeout. (default: %d)"), DEFAULT_HTTP_CLIENT_TIMEOUT));
4344
strUsage += HelpMessageOpt("-rpcconnect=<ip>", strprintf(_("Send commands to node running on <ip> (default: %s)"), DEFAULT_RPCCONNECT));
45+
strUsage += HelpMessageOpt("-rpcpassword=<pw>", _("Password for JSON-RPC connections"));
4446
strUsage += HelpMessageOpt("-rpcport=<port>", strprintf(_("Connect to JSON-RPC on <port> (default: %u or testnet: %u)"), defaultBaseParams->RPCPort(), testnetBaseParams->RPCPort()));
45-
strUsage += HelpMessageOpt("-rpcwait", _("Wait for RPC server to start"));
4647
strUsage += HelpMessageOpt("-rpcuser=<user>", _("Username for JSON-RPC connections"));
47-
strUsage += HelpMessageOpt("-rpcpassword=<pw>", _("Password for JSON-RPC connections"));
48-
strUsage += HelpMessageOpt("-rpcclienttimeout=<n>", strprintf(_("Timeout in seconds during HTTP requests, or 0 for no timeout. (default: %d)"), DEFAULT_HTTP_CLIENT_TIMEOUT));
49-
strUsage += HelpMessageOpt("-stdinrpcpass", strprintf(_("Read RPC password from standard input as a single line. When combined with -stdin, the first line from standard input is used for the RPC password.")));
50-
strUsage += HelpMessageOpt("-stdin", _("Read extra arguments from standard input, one per line until EOF/Ctrl-D (recommended for sensitive information such as passphrases). When combined with -stdinrpcpass, the first line from standard input is used for the RPC password."));
48+
strUsage += HelpMessageOpt("-rpcwait", _("Wait for RPC server to start"));
5149
strUsage += HelpMessageOpt("-rpcwallet=<walletname>", _("Send RPC for non-default wallet on RPC server (argument is wallet filename in bitcoind directory, required if bitcoind/-Qt runs with multiple wallets)"));
50+
strUsage += HelpMessageOpt("-stdin", _("Read extra arguments from standard input, one per line until EOF/Ctrl-D (recommended for sensitive information such as passphrases). When combined with -stdinrpcpass, the first line from standard input is used for the RPC password."));
51+
strUsage += HelpMessageOpt("-stdinrpcpass", strprintf(_("Read RPC password from standard input as a single line. When combined with -stdin, the first line from standard input is used for the RPC password.")));
5252

5353
return strUsage;
5454
}

src/bitcoin-tx.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,18 +77,18 @@ static int AppInitRawTx(int argc, char* argv[])
7777
strUsage += HelpMessageOpt("in=TXID:VOUT(:SEQUENCE_NUMBER)", _("Add input to TX"));
7878
strUsage += HelpMessageOpt("locktime=N", _("Set TX lock time to N"));
7979
strUsage += HelpMessageOpt("nversion=N", _("Set TX version to N"));
80-
strUsage += HelpMessageOpt("replaceable(=N)", _("Set RBF opt-in sequence number for input N (if not provided, opt-in all available inputs)"));
8180
strUsage += HelpMessageOpt("outaddr=VALUE:ADDRESS", _("Add address-based output to TX"));
81+
strUsage += HelpMessageOpt("outdata=[VALUE:]DATA", _("Add data-based output to TX"));
82+
strUsage += HelpMessageOpt("outmultisig=VALUE:REQUIRED:PUBKEYS:PUBKEY1:PUBKEY2:....[:FLAGS]", _("Add Pay To n-of-m Multi-sig output to TX. n = REQUIRED, m = PUBKEYS") + ". " +
83+
_("Optionally add the \"W\" flag to produce a pay-to-witness-script-hash output") + ". " +
84+
_("Optionally add the \"S\" flag to wrap the output in a pay-to-script-hash."));
8285
strUsage += HelpMessageOpt("outpubkey=VALUE:PUBKEY[:FLAGS]", _("Add pay-to-pubkey output to TX") + ". " +
8386
_("Optionally add the \"W\" flag to produce a pay-to-witness-pubkey-hash output") + ". " +
8487
_("Optionally add the \"S\" flag to wrap the output in a pay-to-script-hash."));
85-
strUsage += HelpMessageOpt("outdata=[VALUE:]DATA", _("Add data-based output to TX"));
8688
strUsage += HelpMessageOpt("outscript=VALUE:SCRIPT[:FLAGS]", _("Add raw script output to TX") + ". " +
8789
_("Optionally add the \"W\" flag to produce a pay-to-witness-script-hash output") + ". " +
8890
_("Optionally add the \"S\" flag to wrap the output in a pay-to-script-hash."));
89-
strUsage += HelpMessageOpt("outmultisig=VALUE:REQUIRED:PUBKEYS:PUBKEY1:PUBKEY2:....[:FLAGS]", _("Add Pay To n-of-m Multi-sig output to TX. n = REQUIRED, m = PUBKEYS") + ". " +
90-
_("Optionally add the \"W\" flag to produce a pay-to-witness-script-hash output") + ". " +
91-
_("Optionally add the \"S\" flag to wrap the output in a pay-to-script-hash."));
91+
strUsage += HelpMessageOpt("replaceable(=N)", _("Set RBF opt-in sequence number for input N (if not provided, opt-in all available inputs)"));
9292
strUsage += HelpMessageOpt("sign=SIGHASH-FLAGS", _("Add zero or more signatures to transaction") + ". " +
9393
_("This command requires JSON registers:") +
9494
_("prevtxs=JSON object") + ", " +

src/chainparamsbase.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ const std::string CBaseChainParams::REGTEST = "regtest";
1717
void AppendParamsHelpMessages(std::string& strUsage, bool debugHelp)
1818
{
1919
strUsage += HelpMessageGroup(_("Chain selection options:"));
20-
strUsage += HelpMessageOpt("-testnet", _("Use the test chain"));
2120
if (debugHelp) {
2221
strUsage += HelpMessageOpt("-regtest", "Enter regression test mode, which uses a special chain in which blocks can be solved instantly. "
2322
"This is intended for regression testing tools and app development.");
2423
}
24+
strUsage += HelpMessageOpt("-testnet", _("Use the test chain"));
2525
}
2626

2727
/**

0 commit comments

Comments
 (0)