Browse Source

[wallet] Add StartWallets() function to wallet/init.cpp

0.16
John Newbery 7 years ago
parent
commit
43b0e81d0f
  1. 5
      src/init.cpp
  2. 6
      src/wallet/init.cpp
  3. 4
      src/wallet/init.h

5
src/init.cpp

@ -44,7 +44,6 @@ @@ -44,7 +44,6 @@
#include "validationinterface.h"
#ifdef ENABLE_WALLET
#include "wallet/init.h"
#include "wallet/wallet.h"
#endif
#include "warnings.h"
#include <stdint.h>
@ -1691,9 +1690,7 @@ bool AppInitMain(boost::thread_group& threadGroup, CScheduler& scheduler) @@ -1691,9 +1690,7 @@ bool AppInitMain(boost::thread_group& threadGroup, CScheduler& scheduler)
uiInterface.InitMessage(_("Done loading"));
#ifdef ENABLE_WALLET
for (CWalletRef pwallet : vpwallets) {
pwallet->postInitProcess(scheduler);
}
StartWallets(scheduler);
#endif
return !fRequestShutdown;

6
src/wallet/init.cpp

@ -254,6 +254,12 @@ bool OpenWallets() @@ -254,6 +254,12 @@ bool OpenWallets()
return true;
}
void StartWallets(CScheduler& scheduler) {
for (CWalletRef pwallet : vpwallets) {
pwallet->postInitProcess(scheduler);
}
}
void FlushWallets() {
for (CWalletRef pwallet : vpwallets) {
pwallet->Flush(false);

4
src/wallet/init.h

@ -9,6 +9,7 @@ @@ -9,6 +9,7 @@
#include <string>
class CRPCTable;
class CScheduler;
//! Return the wallets help message.
std::string GetWalletHelpString(bool showDebug);
@ -27,6 +28,9 @@ bool VerifyWallets(); @@ -27,6 +28,9 @@ bool VerifyWallets();
//! Load wallet databases.
bool OpenWallets();
//! Complete startup of wallets.
void StartWallets(CScheduler& scheduler);
//! Flush all wallets in preparation for shutdown.
void FlushWallets();

Loading…
Cancel
Save