mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 23:18:14 +01:00
[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.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user