wallet: Make WalletInitInterface and DummyWalletInit private

This commit is contained in:
João Barbosa
2018-03-29 10:08:38 +01:00
parent 5f0c6a7b0e
commit 39bc2faa2e
9 changed files with 54 additions and 85 deletions

View File

@@ -72,7 +72,24 @@ static const bool DEFAULT_STOPAFTERBLOCKIMPORT = false;
std::unique_ptr<CConnman> g_connman;
std::unique_ptr<PeerLogicValidation> peerLogic;
std::unique_ptr<WalletInitInterface> g_wallet_init_interface;
#if !(ENABLE_WALLET)
class DummyWalletInit : public WalletInitInterface {
public:
std::string GetHelpString(bool showDebug) override {return std::string{};}
bool ParameterInteraction() override {return true;}
void RegisterRPC(CRPCTable &) override {}
bool Verify() override {return true;}
bool Open() override {return true;}
void Start(CScheduler& scheduler) override {}
void Flush() override {}
void Stop() override {}
void Close() override {}
};
std::unique_ptr<WalletInitInterface> g_wallet_init_interface(new DummyWalletInit);
#endif
#if ENABLE_ZMQ
static CZMQNotificationInterface* pzmqNotificationInterface = nullptr;