diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/bitcoin-cli.cpp | 5 | ||||
-rw-r--r-- | src/bitcoin-tx.cpp | 5 | ||||
-rw-r--r-- | src/bitcoin-util.cpp | 5 | ||||
-rw-r--r-- | src/bitcoin-wallet.cpp | 5 | ||||
-rw-r--r-- | src/bitcoind.cpp | 7 |
5 files changed, 20 insertions, 7 deletions
diff --git a/src/bitcoin-cli.cpp b/src/bitcoin-cli.cpp index 874e38752a..5523fff3b2 100644 --- a/src/bitcoin-cli.cpp +++ b/src/bitcoin-cli.cpp @@ -133,7 +133,10 @@ static int AppInitRPC(int argc, char* argv[]) } if (argc < 2 || HelpRequested(gArgs) || gArgs.IsArgSet("-version")) { std::string strUsage = PACKAGE_NAME " RPC client version " + FormatFullVersion() + "\n"; - if (!gArgs.IsArgSet("-version")) { + + if (gArgs.IsArgSet("-version")) { + strUsage += FormatParagraph(LicenseInfo()); + } else { strUsage += "\n" "Usage: bitcoin-cli [options] <command> [params] Send command to " PACKAGE_NAME "\n" "or: bitcoin-cli [options] -named <command> [name=value]... Send command to " PACKAGE_NAME " (with named arguments)\n" diff --git a/src/bitcoin-tx.cpp b/src/bitcoin-tx.cpp index ec07114d6e..b297081cab 100644 --- a/src/bitcoin-tx.cpp +++ b/src/bitcoin-tx.cpp @@ -102,7 +102,10 @@ static int AppInitRawTx(int argc, char* argv[]) if (argc < 2 || HelpRequested(gArgs) || gArgs.IsArgSet("-version")) { // First part of help message is specific to this utility std::string strUsage = PACKAGE_NAME " bitcoin-tx utility version " + FormatFullVersion() + "\n"; - if (!gArgs.IsArgSet("-version")) { + + if (gArgs.IsArgSet("-version")) { + strUsage += FormatParagraph(LicenseInfo()); + } else { strUsage += "\n" "Usage: bitcoin-tx [options] <hex-tx> [commands] Update hex-encoded bitcoin transaction\n" "or: bitcoin-tx [options] -create [commands] Create hex-encoded bitcoin transaction\n" diff --git a/src/bitcoin-util.cpp b/src/bitcoin-util.cpp index 973f4f2883..b457e0b354 100644 --- a/src/bitcoin-util.cpp +++ b/src/bitcoin-util.cpp @@ -53,7 +53,10 @@ static int AppInitUtil(ArgsManager& args, int argc, char* argv[]) if (HelpRequested(args) || args.IsArgSet("-version")) { // First part of help message is specific to this utility std::string strUsage = PACKAGE_NAME " bitcoin-util utility version " + FormatFullVersion() + "\n"; - if (!args.IsArgSet("-version")) { + + if (args.IsArgSet("-version")) { + strUsage += FormatParagraph(LicenseInfo()); + } else { strUsage += "\n" "Usage: bitcoin-util [options] [commands] Do stuff\n"; strUsage += "\n" + args.GetHelpMessage(); diff --git a/src/bitcoin-wallet.cpp b/src/bitcoin-wallet.cpp index ff5485e2da..2f3dd45267 100644 --- a/src/bitcoin-wallet.cpp +++ b/src/bitcoin-wallet.cpp @@ -59,7 +59,10 @@ static bool WalletAppInit(ArgsManager& args, int argc, char* argv[]) } if (argc < 2 || HelpRequested(args) || args.IsArgSet("-version")) { std::string strUsage = strprintf("%s bitcoin-wallet version", PACKAGE_NAME) + " " + FormatFullVersion() + "\n"; - if (!args.IsArgSet("-version")) { + + if (args.IsArgSet("-version")) { + strUsage += FormatParagraph(LicenseInfo()); + } else { strUsage += "\n" "bitcoin-wallet is an offline tool for creating and interacting with " PACKAGE_NAME " wallet files.\n" "By default bitcoin-wallet will act on wallets in the default mainnet wallet directory in the datadir.\n" diff --git a/src/bitcoind.cpp b/src/bitcoind.cpp index 6432e8849d..9843382682 100644 --- a/src/bitcoind.cpp +++ b/src/bitcoind.cpp @@ -126,9 +126,10 @@ static bool AppInit(NodeContext& node, int argc, char* argv[]) if (HelpRequested(args) || args.IsArgSet("-version")) { std::string strUsage = PACKAGE_NAME " version " + FormatFullVersion() + "\n"; - if (!args.IsArgSet("-version")) { - strUsage += FormatParagraph(LicenseInfo()) + "\n" - "\nUsage: bitcoind [options] Start " PACKAGE_NAME "\n" + if (args.IsArgSet("-version")) { + strUsage += FormatParagraph(LicenseInfo()); + } else { + strUsage += "\nUsage: bitcoind [options] Start " PACKAGE_NAME "\n" "\n"; strUsage += args.GetHelpMessage(); } |