mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-06 18:53:21 +01:00
[moveonly] Extract HelpRequested to dry up the help options testing
This ensures consistency across interfaces and makes the version handling more clear.
This commit is contained in:
@@ -82,7 +82,7 @@ static int AppInitRPC(int argc, char* argv[])
|
||||
// Parameters
|
||||
//
|
||||
gArgs.ParseParameters(argc, argv);
|
||||
if (argc<2 || gArgs.IsArgSet("-?") || gArgs.IsArgSet("-h") || gArgs.IsArgSet("-help") || gArgs.IsArgSet("-version")) {
|
||||
if (argc < 2 || HelpRequested(gArgs) || gArgs.IsArgSet("-version")) {
|
||||
std::string strUsage = strprintf(_("%s RPC client version"), _(PACKAGE_NAME)) + " " + FormatFullVersion() + "\n";
|
||||
if (!gArgs.IsArgSet("-version")) {
|
||||
strUsage += "\n" + _("Usage:") + "\n" +
|
||||
|
||||
Reference in New Issue
Block a user