aboutsummaryrefslogtreecommitdiff
path: root/src/init.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/init.cpp')
-rw-r--r--src/init.cpp10
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