diff options
author | Andrew Chow <achow101-github@achow101.com> | 2018-04-28 16:54:58 -0400 |
---|---|---|
committer | Andrew Chow <achow101-github@achow101.com> | 2018-05-09 12:21:05 -0400 |
commit | 4d4185a4f0e40c033a587871839a47cb3f89ee93 (patch) | |
tree | de7d02bcfe19bafb3faf0f220a35b303fbfc3ba8 /src/bitcoind.cpp | |
parent | 08c1caf863656e8c4302f0ff392772f0055760e5 (diff) |
Make gArgs aware of the arguments
gArgs knows what the available arguments are and their help. Getting
the help message is moved to gArgs and HelpMessage() is removed
Diffstat (limited to 'src/bitcoind.cpp')
-rw-r--r-- | src/bitcoind.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/bitcoind.cpp b/src/bitcoind.cpp index 32b67cabb9..1539e4025a 100644 --- a/src/bitcoind.cpp +++ b/src/bitcoind.cpp @@ -61,6 +61,10 @@ static bool AppInit(int argc, char* argv[]) // Parameters // // If Qt is used, parameters/bitcoin.conf are parsed in qt/bitcoin.cpp's main() + SetupServerArgs(); +#if HAVE_DECL_DAEMON + gArgs.AddArg("-daemon", _("Run in the background as a daemon and accept commands"), false, OptionsCategory::OPTIONS); +#endif gArgs.ParseParameters(argc, argv); // Process help and version before taking care about datadir @@ -76,7 +80,7 @@ static bool AppInit(int argc, char* argv[]) strUsage += "\n" + _("Usage:") + "\n" + " bitcoind [options] " + strprintf(_("Start %s Daemon"), _(PACKAGE_NAME)) + "\n"; - strUsage += "\n" + HelpMessage(HelpMessageMode::BITCOIND); + strUsage += "\n" + gArgs.GetHelpMessage(); } fprintf(stdout, "%s", strUsage.c_str()); |