aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/init.cpp5
-rw-r--r--src/wallet/init.cpp6
-rw-r--r--src/wallet/init.h4
3 files changed, 11 insertions, 4 deletions
diff --git a/src/init.cpp b/src/init.cpp
index 9022b4a4c9..fc31d3d4dd 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -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)
uiInterface.InitMessage(_("Done loading"));
#ifdef ENABLE_WALLET
- for (CWalletRef pwallet : vpwallets) {
- pwallet->postInitProcess(scheduler);
- }
+ StartWallets(scheduler);
#endif
return !fRequestShutdown;
diff --git a/src/wallet/init.cpp b/src/wallet/init.cpp
index 9fd038150f..1e00735ed9 100644
--- a/src/wallet/init.cpp
+++ b/src/wallet/init.cpp
@@ -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);
diff --git a/src/wallet/init.h b/src/wallet/init.h
index 588357119c..0d5e5f0cde 100644
--- a/src/wallet/init.h
+++ b/src/wallet/init.h
@@ -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();
//! Load wallet databases.
bool OpenWallets();
+//! Complete startup of wallets.
+void StartWallets(CScheduler& scheduler);
+
//! Flush all wallets in preparation for shutdown.
void FlushWallets();