mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-14 12:43:40 +02:00
Wallet: Replace pwalletMain with a vector of wallet pointers
This commit is contained in:
parent
19b3648bb5
commit
b124cf04ea
10 changed files with 51 additions and 45 deletions
21
src/init.cpp
21
src/init.cpp
|
|
@ -198,8 +198,9 @@ void Shutdown()
|
|||
StopRPC();
|
||||
StopHTTPServer();
|
||||
#ifdef ENABLE_WALLET
|
||||
if (pwalletMain)
|
||||
pwalletMain->Flush(false);
|
||||
for (CWalletRef pwallet : vpwallets) {
|
||||
pwallet->Flush(false);
|
||||
}
|
||||
#endif
|
||||
MapPort(false);
|
||||
UnregisterValidationInterface(peerLogic.get());
|
||||
|
|
@ -239,8 +240,9 @@ void Shutdown()
|
|||
pblocktree = NULL;
|
||||
}
|
||||
#ifdef ENABLE_WALLET
|
||||
if (pwalletMain)
|
||||
pwalletMain->Flush(true);
|
||||
for (CWalletRef pwallet : vpwallets) {
|
||||
pwallet->Flush(true);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if ENABLE_ZMQ
|
||||
|
|
@ -260,8 +262,10 @@ void Shutdown()
|
|||
#endif
|
||||
UnregisterAllValidationInterfaces();
|
||||
#ifdef ENABLE_WALLET
|
||||
delete pwalletMain;
|
||||
pwalletMain = NULL;
|
||||
for (CWalletRef pwallet : vpwallets) {
|
||||
delete pwallet;
|
||||
}
|
||||
vpwallets.clear();
|
||||
#endif
|
||||
globalVerifyHandle.reset();
|
||||
ECC_Stop();
|
||||
|
|
@ -1673,8 +1677,9 @@ bool AppInitMain(boost::thread_group& threadGroup, CScheduler& scheduler)
|
|||
uiInterface.InitMessage(_("Done loading"));
|
||||
|
||||
#ifdef ENABLE_WALLET
|
||||
if (pwalletMain)
|
||||
pwalletMain->postInitProcess(scheduler);
|
||||
for (CWalletRef pwallet : vpwallets) {
|
||||
pwallet->postInitProcess(scheduler);
|
||||
}
|
||||
#endif
|
||||
|
||||
return !fRequestShutdown;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue