mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-03-19 12:10:19 +01:00
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
This commit is contained in:
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user