File tree Expand file tree Collapse file tree 3 files changed +6
-4
lines changed Expand file tree Collapse file tree 3 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -88,7 +88,8 @@ class DummyWalletInit : public WalletInitInterface {
88
88
void Close () override {}
89
89
};
90
90
91
- std::unique_ptr<WalletInitInterface> g_wallet_init_interface (new DummyWalletInit);
91
+ static DummyWalletInit g_dummy_wallet_init;
92
+ WalletInitInterface* const g_wallet_init_interface = &g_dummy_wallet_init;
92
93
#endif
93
94
94
95
#if ENABLE_ZMQ
@@ -283,7 +284,6 @@ void Shutdown()
283
284
GetMainSignals ().UnregisterBackgroundSignalScheduler ();
284
285
GetMainSignals ().UnregisterWithMempoolSignals (mempool);
285
286
g_wallet_init_interface->Close ();
286
- g_wallet_init_interface.reset ();
287
287
globalVerifyHandle.reset ();
288
288
ECC_Stop ();
289
289
LogPrintf (" %s: done\n " , __func__);
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ class CScheduler;
13
13
class CWallet ;
14
14
15
15
class WalletInitInterface ;
16
- extern std::unique_ptr< WalletInitInterface> g_wallet_init_interface;
16
+ extern WalletInitInterface* const g_wallet_init_interface;
17
17
18
18
namespace boost
19
19
{
Original file line number Diff line number Diff line change 4
4
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
5
5
6
6
#include < chainparams.h>
7
+ #include < init.h>
7
8
#include < net.h>
8
9
#include < util.h>
9
10
#include < utilmoneystr.h>
@@ -46,7 +47,8 @@ class WalletInit : public WalletInitInterface {
46
47
void Close () override ;
47
48
};
48
49
49
- std::unique_ptr<WalletInitInterface> g_wallet_init_interface (new WalletInit);
50
+ static WalletInit g_wallet_init;
51
+ WalletInitInterface* const g_wallet_init_interface = &g_wallet_init;
50
52
51
53
std::string WalletInit::GetHelpString (bool showDebug)
52
54
{
You can’t perform that action at this time.
0 commit comments