diff options
Diffstat (limited to 'src/bitcoind.cpp')
-rw-r--r-- | src/bitcoind.cpp | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/src/bitcoind.cpp b/src/bitcoind.cpp index 1e27924dfd..5d5f06127d 100644 --- a/src/bitcoind.cpp +++ b/src/bitcoind.cpp @@ -3,7 +3,7 @@ // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. -#include <config/bitcoin-config.h> // IWYU pragma: keep +#include <bitcoin-build-config.h> // IWYU pragma: keep #include <chainparams.h> #include <clientversion.h> @@ -135,13 +135,19 @@ static bool ParseArgs(NodeContext& node, int argc, char* argv[]) static bool ProcessInitCommands(ArgsManager& args) { // Process help and version before taking care about datadir - if (HelpRequested(args) || args.IsArgSet("-version")) { - std::string strUsage = PACKAGE_NAME " version " + FormatFullVersion() + "\n"; + if (HelpRequested(args) || args.GetBoolArg("-version", false)) { + std::string strUsage = CLIENT_NAME " daemon version " + FormatFullVersion() + "\n"; - if (args.IsArgSet("-version")) { + if (args.GetBoolArg("-version", false)) { strUsage += FormatParagraph(LicenseInfo()); } else { - strUsage += "\nUsage: bitcoind [options] Start " PACKAGE_NAME "\n" + strUsage += "\n" + "The " CLIENT_NAME " daemon (bitcoind) is a headless program that connects to the Bitcoin network to validate and relay transactions and blocks, as well as relaying addresses.\n\n" + "It provides the backbone of the Bitcoin network and its RPC, REST and ZMQ services can provide various transaction, block and address-related services.\n\n" + "There is an optional wallet component which provides transaction services.\n\n" + "It can be used in a headless environment or as part of a server setup.\n" + "\n" + "Usage: bitcoind [options]\n" "\n"; strUsage += args.GetHelpMessage(); } @@ -195,7 +201,7 @@ static bool AppInit(NodeContext& node) if (args.GetBoolArg("-daemon", DEFAULT_DAEMON) || args.GetBoolArg("-daemonwait", DEFAULT_DAEMONWAIT)) { #if HAVE_DECL_FORK - tfm::format(std::cout, PACKAGE_NAME " starting\n"); + tfm::format(std::cout, CLIENT_NAME " starting\n"); // Daemonize switch (fork_daemon(1, 0, daemon_ep)) { // don't chdir (1), do close FDs (0) @@ -274,7 +280,7 @@ MAIN_FUNCTION if (ProcessInitCommands(args)) return EXIT_SUCCESS; // Start application - if (!AppInit(node) || !Assert(node.shutdown)->wait()) { + if (!AppInit(node) || !Assert(node.shutdown_signal)->wait()) { node.exit_status = EXIT_FAILURE; } Interrupt(node); |