aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/init.cpp4
-rw-r--r--src/init.h2
-rw-r--r--src/wallet/init.cpp4
3 files changed, 6 insertions, 4 deletions
diff --git a/src/init.cpp b/src/init.cpp
index 8c86bff11c..880c8bce1e 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -88,7 +88,8 @@ public:
void Close() override {}
};
-std::unique_ptr<WalletInitInterface> g_wallet_init_interface(new DummyWalletInit);
+static DummyWalletInit g_dummy_wallet_init;
+WalletInitInterface* const g_wallet_init_interface = &g_dummy_wallet_init;
#endif
#if ENABLE_ZMQ
@@ -283,7 +284,6 @@ void Shutdown()
GetMainSignals().UnregisterBackgroundSignalScheduler();
GetMainSignals().UnregisterWithMempoolSignals(mempool);
g_wallet_init_interface->Close();
- g_wallet_init_interface.reset();
globalVerifyHandle.reset();
ECC_Stop();
LogPrintf("%s: done\n", __func__);
diff --git a/src/init.h b/src/init.h
index c93a210154..829c110112 100644
--- a/src/init.h
+++ b/src/init.h
@@ -13,7 +13,7 @@ class CScheduler;
class CWallet;
class WalletInitInterface;
-extern std::unique_ptr<WalletInitInterface> g_wallet_init_interface;
+extern WalletInitInterface* const g_wallet_init_interface;
namespace boost
{
diff --git a/src/wallet/init.cpp b/src/wallet/init.cpp
index fd6c8cc0ca..c860eede05 100644
--- a/src/wallet/init.cpp
+++ b/src/wallet/init.cpp
@@ -4,6 +4,7 @@
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <chainparams.h>
+#include <init.h>
#include <net.h>
#include <util.h>
#include <utilmoneystr.h>
@@ -46,7 +47,8 @@ public:
void Close() override;
};
-std::unique_ptr<WalletInitInterface> g_wallet_init_interface(new WalletInit);
+static WalletInit g_wallet_init;
+WalletInitInterface* const g_wallet_init_interface = &g_wallet_init;
std::string WalletInit::GetHelpString(bool showDebug)
{