aboutsummaryrefslogtreecommitdiff
path: root/src/dummywallet.cpp
diff options
context:
space:
mode:
authorJohn Newbery <john@johnnewbery.com>2018-09-12 10:05:00 -0400
committerJohn Newbery <john@johnnewbery.com>2018-09-13 09:37:37 -0400
commite4ef4b459548b4032b9da03b3103525f935acb82 (patch)
treefd50dca509852d8a1765da3ab50adf8b71a4d842 /src/dummywallet.cpp
parent8f464549c46db2954d7b64d1feb200eb35f2e7e8 (diff)
downloadbitcoin-e4ef4b459548b4032b9da03b3103525f935acb82.tar.xz
[build] remove #ifdef ENABLE_WALLET from interfaces/node
Removes the final #ifdef ENABLE_WALLET from libbitcoin_server by calling g_wallet_init_interface.HasWalletSupport(), and redifining GetWallets() and MakeWallet() in dummywallet.cpp.
Diffstat (limited to 'src/dummywallet.cpp')
-rw-r--r--src/dummywallet.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/dummywallet.cpp b/src/dummywallet.cpp
index 5b33daf85d..3714187a96 100644
--- a/src/dummywallet.cpp
+++ b/src/dummywallet.cpp
@@ -6,6 +6,8 @@
#include <util.h>
#include <walletinitinterface.h>
+class CWallet;
+
class DummyWalletInit : public WalletInitInterface {
public:
@@ -31,3 +33,19 @@ void DummyWalletInit::AddWalletOptions() const
}
const WalletInitInterface& g_wallet_init_interface = DummyWalletInit();
+
+std::vector<std::shared_ptr<CWallet>> GetWallets()
+{
+ throw std::logic_error("Wallet function called in non-wallet build.");
+}
+
+namespace interfaces {
+
+class Wallet;
+
+std::unique_ptr<Wallet> MakeWallet(const std::shared_ptr<CWallet>& wallet)
+{
+ throw std::logic_error("Wallet function called in non-wallet build.");
+}
+
+} // namespace interfaces