From 8db11dd0b182a93042899651545cc21b34bf0742 Mon Sep 17 00:00:00 2001 From: Russell Yanofsky Date: Tue, 30 May 2017 15:55:17 -0400 Subject: Pass chain and client variables where needed This commit does not change behavior. All it does is pass new function parameters. It is easiest to review this change with: git log -p -n1 -U0 --word-diff-regex=. --- src/interfaces/node.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/interfaces/node.cpp') diff --git a/src/interfaces/node.cpp b/src/interfaces/node.cpp index 490c456e6..1919e16a6 100644 --- a/src/interfaces/node.cpp +++ b/src/interfaces/node.cpp @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include @@ -50,6 +51,8 @@ namespace { class NodeImpl : public Node { +public: + NodeImpl() { m_interfaces.chain = MakeChain(); } bool parseParameters(int argc, const char* const argv[], std::string& error) override { return gArgs.ParseParameters(argc, argv, error); @@ -68,11 +71,11 @@ class NodeImpl : public Node return AppInitBasicSetup() && AppInitParameterInteraction() && AppInitSanityChecks() && AppInitLockDataDirectory(); } - bool appInitMain() override { return AppInitMain(); } + bool appInitMain() override { return AppInitMain(m_interfaces); } void appShutdown() override { Interrupt(); - Shutdown(); + Shutdown(m_interfaces); } void startShutdown() override { StartShutdown(); } bool shutdownRequested() override { return ShutdownRequested(); } @@ -291,6 +294,7 @@ class NodeImpl : public Node GuessVerificationProgress(Params().TxData(), block)); })); } + InitInterfaces m_interfaces; }; } // namespace -- cgit v1.2.3