aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces
diff options
context:
space:
mode:
authorRussell Yanofsky <russ@yanofsky.org>2017-05-30 15:55:17 -0400
committerRussell Yanofsky <russ@yanofsky.org>2018-11-06 11:44:40 -0400
commit8db11dd0b182a93042899651545cc21b34bf0742 (patch)
tree8165f7a88f2f56cca4d152c5e4fc0d2e5743bc54 /src/interfaces
parent7e2e62cf7c513bd7d8e784069c5534fda1c50c52 (diff)
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=.
Diffstat (limited to 'src/interfaces')
-rw-r--r--src/interfaces/node.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/interfaces/node.cpp b/src/interfaces/node.cpp
index 490c456e6e..1919e16a66 100644
--- a/src/interfaces/node.cpp
+++ b/src/interfaces/node.cpp
@@ -9,6 +9,7 @@
#include <chain.h>
#include <chainparams.h>
#include <init.h>
+#include <interfaces/chain.h>
#include <interfaces/handler.h>
#include <interfaces/wallet.h>
#include <net.h>
@@ -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