diff options
author | Russell Yanofsky <russ@yanofsky.org> | 2017-05-30 15:55:17 -0400 |
---|---|---|
committer | Russell Yanofsky <russ@yanofsky.org> | 2018-11-06 11:44:40 -0400 |
commit | 8db11dd0b182a93042899651545cc21b34bf0742 (patch) | |
tree | 8165f7a88f2f56cca4d152c5e4fc0d2e5743bc54 /src/init.cpp | |
parent | 7e2e62cf7c513bd7d8e784069c5534fda1c50c52 (diff) | |
download | bitcoin-8db11dd0b182a93042899651545cc21b34bf0742.tar.xz |
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/init.cpp')
-rw-r--r-- | src/init.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/init.cpp b/src/init.cpp index d54d4a8782..88d4d059f9 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -32,6 +32,7 @@ #include <rpc/server.h> #include <rpc/register.h> #include <rpc/blockchain.h> +#include <rpc/util.h> #include <script/standard.h> #include <script/sigcache.h> #include <scheduler.h> @@ -157,7 +158,7 @@ void Interrupt() } } -void Shutdown() +void Shutdown(InitInterfaces& interfaces) { LogPrintf("%s: In progress...\n", __func__); static CCriticalSection cs_Shutdown; @@ -1158,7 +1159,7 @@ bool AppInitLockDataDirectory() return true; } -bool AppInitMain() +bool AppInitMain(InitInterfaces& interfaces) { const CChainParams& chainparams = Params(); // ********************************************************* Step 4a: application initialization @@ -1226,6 +1227,7 @@ bool AppInitMain() */ RegisterAllCoreRPCCommands(tableRPC); g_wallet_init_interface.RegisterRPC(tableRPC); + g_rpc_interfaces = &interfaces; #if ENABLE_ZMQ RegisterZMQRPCCommands(tableRPC); #endif @@ -1243,7 +1245,7 @@ bool AppInitMain() } // ********************************************************* Step 5: verify wallet database integrity - if (!g_wallet_init_interface.Verify()) return false; + if (!g_wallet_init_interface.Verify(*interfaces.chain)) return false; // ********************************************************* Step 6: network initialization // Note that we absolutely cannot open any actual connections @@ -1562,7 +1564,7 @@ bool AppInitMain() } // ********************************************************* Step 9: load wallet - if (!g_wallet_init_interface.Open()) return false; + if (!g_wallet_init_interface.Open(*interfaces.chain)) return false; // ********************************************************* Step 10: data directory maintenance |