Skip to content

Commit 43b0e81

Browse files
committed
[wallet] Add StartWallets() function to wallet/init.cpp
1 parent 290f3c5 commit 43b0e81

File tree

3 files changed

+11
-4
lines changed

3 files changed

+11
-4
lines changed

src/init.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@
4444
#include "validationinterface.h"
4545
#ifdef ENABLE_WALLET
4646
#include "wallet/init.h"
47-
#include "wallet/wallet.h"
4847
#endif
4948
#include "warnings.h"
5049
#include <stdint.h>
@@ -1691,9 +1690,7 @@ bool AppInitMain(boost::thread_group& threadGroup, CScheduler& scheduler)
16911690
uiInterface.InitMessage(_("Done loading"));
16921691

16931692
#ifdef ENABLE_WALLET
1694-
for (CWalletRef pwallet : vpwallets) {
1695-
pwallet->postInitProcess(scheduler);
1696-
}
1693+
StartWallets(scheduler);
16971694
#endif
16981695

16991696
return !fRequestShutdown;

src/wallet/init.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,12 @@ bool OpenWallets()
254254
return true;
255255
}
256256

257+
void StartWallets(CScheduler& scheduler) {
258+
for (CWalletRef pwallet : vpwallets) {
259+
pwallet->postInitProcess(scheduler);
260+
}
261+
}
262+
257263
void FlushWallets() {
258264
for (CWalletRef pwallet : vpwallets) {
259265
pwallet->Flush(false);

src/wallet/init.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
#include <string>
1010

1111
class CRPCTable;
12+
class CScheduler;
1213

1314
//! Return the wallets help message.
1415
std::string GetWalletHelpString(bool showDebug);
@@ -27,6 +28,9 @@ bool VerifyWallets();
2728
//! Load wallet databases.
2829
bool OpenWallets();
2930

31+
//! Complete startup of wallets.
32+
void StartWallets(CScheduler& scheduler);
33+
3034
//! Flush all wallets in preparation for shutdown.
3135
void FlushWallets();
3236

0 commit comments

Comments
 (0)