aboutsummaryrefslogtreecommitdiff
path: root/src/bitcoind.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/bitcoind.cpp')
-rw-r--r--src/bitcoind.cpp27
1 files changed, 15 insertions, 12 deletions
diff --git a/src/bitcoind.cpp b/src/bitcoind.cpp
index 704332c39b..99dc9d726d 100644
--- a/src/bitcoind.cpp
+++ b/src/bitcoind.cpp
@@ -83,19 +83,22 @@ bool AppInit(int argc, char* argv[])
return false;
}
- if (mapArgs.count("-?") || mapArgs.count("--help"))
+ if (mapArgs.count("-?") || mapArgs.count("-help") || mapArgs.count("-version"))
{
- // First part of help message is specific to bitcoind / RPC client
- std::string strUsage = _("Bitcoin Core Daemon") + " " + _("version") + " " + FormatFullVersion() + "\n\n" +
- _("Usage:") + "\n" +
- " bitcoind [options] " + _("Start Bitcoin Core Daemon") + "\n" +
- _("Usage (deprecated, use bitcoin-cli):") + "\n" +
- " bitcoind [options] <command> [params] " + _("Send command to Bitcoin Core") + "\n" +
- " bitcoind [options] help " + _("List commands") + "\n" +
- " bitcoind [options] help <command> " + _("Get help for a command") + "\n";
-
- strUsage += "\n" + HelpMessage(HMM_BITCOIND);
- strUsage += "\n" + HelpMessageCli(false);
+ std::string strUsage = _("Bitcoin Core Daemon") + " " + _("version") + " " + FormatFullVersion() + "\n";
+
+ if (!mapArgs.count("-version"))
+ {
+ strUsage += "\n" + _("Usage:") + "\n" +
+ " bitcoind [options] " + _("Start Bitcoin Core Daemon") + "\n" +
+ _("Usage (deprecated, use bitcoin-cli):") + "\n" +
+ " bitcoind [options] <command> [params] " + _("Send command to Bitcoin Core") + "\n" +
+ " bitcoind [options] help " + _("List commands") + "\n" +
+ " bitcoind [options] help <command> " + _("Get help for a command") + "\n";
+
+ strUsage += "\n" + HelpMessage(HMM_BITCOIND);
+ strUsage += "\n" + HelpMessageCli(false);
+ }
fprintf(stdout, "%s", strUsage.c_str());
return false;