aboutsummaryrefslogtreecommitdiff
path: root/src/bitcoind.cpp
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2020-08-21 20:13:40 +0200
committerMarcoFalke <falke.marco@gmail.com>2020-08-24 07:45:17 +0200
commitfa40017706e08b4de111e8e57aabeced60881a57 (patch)
tree7ed4294e423480fbfa745b17d2369ef149a96ec7 /src/bitcoind.cpp
parent197450f80868fe752c6107955e5da80704212b34 (diff)
init: Pass reference to ArgsManager around instead of relying on global
Diffstat (limited to 'src/bitcoind.cpp')
-rw-r--r--src/bitcoind.cpp14
1 files changed, 5 insertions, 9 deletions
diff --git a/src/bitcoind.cpp b/src/bitcoind.cpp
index b04cc12059..77baa07b8e 100644
--- a/src/bitcoind.cpp
+++ b/src/bitcoind.cpp
@@ -50,11 +50,9 @@ static bool AppInit(int argc, char* argv[])
util::ThreadSetInternalName("init");
- //
- // Parameters
- //
// If Qt is used, parameters/bitcoin.conf are parsed in qt/bitcoin.cpp's main()
SetupServerArgs(node);
+ ArgsManager& args = *Assert(node.args);
std::string error;
if (!gArgs.ParseParameters(argc, argv, error)) {
return InitError(Untranslated(strprintf("Error parsing command line arguments: %s\n", error)));
@@ -109,15 +107,13 @@ static bool AppInit(int argc, char* argv[])
// -server defaults to true for bitcoind but not for the GUI so do this here
gArgs.SoftSetBoolArg("-server", true);
// Set this early so that parameter interactions go to console
- InitLogging();
- InitParameterInteraction();
- if (!AppInitBasicSetup())
- {
+ InitLogging(args);
+ InitParameterInteraction(args);
+ if (!AppInitBasicSetup(args)) {
// InitError will have been called with detailed error, which ends up on console
return false;
}
- if (!AppInitParameterInteraction())
- {
+ if (!AppInitParameterInteraction(args)) {
// InitError will have been called with detailed error, which ends up on console
return false;
}