From e6f4f895d5e42feaf7bfa5f41e80292aaa73cd7d Mon Sep 17 00:00:00 2001 From: Russell Yanofsky Date: Tue, 17 Sep 2019 18:28:03 -0400 Subject: Pass NodeContext, ConnMan, BanMan references more places So g_connman and g_banman globals can be removed next commit. --- src/bitcoind.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/bitcoind.cpp') diff --git a/src/bitcoind.cpp b/src/bitcoind.cpp index 1d51ee8f7..be1d60ee5 100644 --- a/src/bitcoind.cpp +++ b/src/bitcoind.cpp @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include @@ -24,13 +25,13 @@ const std::function 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); -- cgit v1.2.3