3232#include < rpc/server.h>
3333#include < rpc/register.h>
3434#include < rpc/blockchain.h>
35+ #include < rpc/util.h>
3536#include < script/standard.h>
3637#include < script/sigcache.h>
3738#include < scheduler.h>
@@ -157,7 +158,7 @@ void Interrupt()
157158 }
158159}
159160
160- void Shutdown ()
161+ void Shutdown (InitInterfaces& interfaces )
161162{
162163 LogPrintf (" %s: In progress...\n " , __func__);
163164 static CCriticalSection cs_Shutdown;
@@ -1158,7 +1159,7 @@ bool AppInitLockDataDirectory()
11581159 return true ;
11591160}
11601161
1161- bool AppInitMain ()
1162+ bool AppInitMain (InitInterfaces& interfaces )
11621163{
11631164 const CChainParams& chainparams = Params ();
11641165 // ********************************************************* Step 4a: application initialization
@@ -1226,6 +1227,7 @@ bool AppInitMain()
12261227 */
12271228 RegisterAllCoreRPCCommands (tableRPC);
12281229 g_wallet_init_interface.RegisterRPC (tableRPC);
1230+ g_rpc_interfaces = &interfaces;
12291231#if ENABLE_ZMQ
12301232 RegisterZMQRPCCommands (tableRPC);
12311233#endif
@@ -1243,7 +1245,7 @@ bool AppInitMain()
12431245 }
12441246
12451247 // ********************************************************* Step 5: verify wallet database integrity
1246- if (!g_wallet_init_interface.Verify ()) return false ;
1248+ if (!g_wallet_init_interface.Verify (*interfaces. chain )) return false ;
12471249
12481250 // ********************************************************* Step 6: network initialization
12491251 // Note that we absolutely cannot open any actual connections
@@ -1562,7 +1564,7 @@ bool AppInitMain()
15621564 }
15631565
15641566 // ********************************************************* Step 9: load wallet
1565- if (!g_wallet_init_interface.Open ()) return false ;
1567+ if (!g_wallet_init_interface.Open (*interfaces. chain )) return false ;
15661568
15671569 // ********************************************************* Step 10: data directory maintenance
15681570
0 commit comments