mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-03-25 06:55:32 +01:00
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=.
This commit is contained in:
10
src/init.cpp
10
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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user