diff options
author | Russell Yanofsky <russ@yanofsky.org> | 2019-09-17 18:28:03 -0400 |
---|---|---|
committer | Russell Yanofsky <russ@yanofsky.org> | 2019-10-28 10:30:51 -0400 |
commit | e6f4f895d5e42feaf7bfa5f41e80292aaa73cd7d (patch) | |
tree | 1c12f814ae2ac88316066d334274354c669d7aa5 /src/bitcoind.cpp | |
parent | 4d5448c76b71c9d91399c31b043237091be2e5e7 (diff) |
Pass NodeContext, ConnMan, BanMan references more places
So g_connman and g_banman globals can be removed next commit.
Diffstat (limited to 'src/bitcoind.cpp')
-rw-r--r-- | src/bitcoind.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/bitcoind.cpp b/src/bitcoind.cpp index 1d51ee8f78..be1d60ee52 100644 --- a/src/bitcoind.cpp +++ b/src/bitcoind.cpp @@ -12,6 +12,7 @@ #include <compat.h> #include <init.h> #include <interfaces/chain.h> +#include <node/context.h> #include <noui.h> #include <shutdown.h> #include <ui_interface.h> @@ -24,13 +25,13 @@ const std::function<std::string(const char*)> G_TRANSLATION_FUN = nullptr; -static void WaitForShutdown() +static void WaitForShutdown(NodeContext& node) { while (!ShutdownRequested()) { MilliSleep(200); } - Interrupt(); + Interrupt(node); } ////////////////////////////////////////////////////////////////////////////// @@ -40,7 +41,7 @@ static void WaitForShutdown() static bool AppInit(int argc, char* argv[]) { NodeContext node; - node.chain = interfaces::MakeChain(); + node.chain = interfaces::MakeChain(node); bool fRet = false; @@ -152,9 +153,9 @@ static bool AppInit(int argc, char* argv[]) if (!fRet) { - Interrupt(); + Interrupt(node); } else { - WaitForShutdown(); + WaitForShutdown(node); } Shutdown(node); |