diff options
author | Russell Yanofsky <russ@yanofsky.org> | 2017-12-05 15:57:12 -0500 |
---|---|---|
committer | Russell Yanofsky <russ@yanofsky.org> | 2020-03-19 15:26:04 -0500 |
commit | 77e4b0657298c715c835d8d2eb11e173852e6815 (patch) | |
tree | 545497b4cde5a179ba09fdfc5ecdacfd0e423ecf /src/interfaces | |
parent | 5bf45fe2a9642f8ae8f8a12bcbf8f8b4770421ad (diff) | |
download | bitcoin-77e4b0657298c715c835d8d2eb11e173852e6815.tar.xz |
refactor: Get rid of Wallet::IsWalletFlagSet method
Replace by privateKeysDisabled method to avoid need for GUI to reference
internal wallet flags.
Also remove adjacent WalletModel canGetAddresses wrapper that serves no purpose
and make Wallet::canGetAddresses non-const so it can be implemented by IPC
classes in #10102.
Diffstat (limited to 'src/interfaces')
-rw-r--r-- | src/interfaces/wallet.cpp | 4 | ||||
-rw-r--r-- | src/interfaces/wallet.h | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/interfaces/wallet.cpp b/src/interfaces/wallet.cpp index 01ade56b2a..c2d42d78d3 100644 --- a/src/interfaces/wallet.cpp +++ b/src/interfaces/wallet.cpp @@ -463,8 +463,8 @@ public: } unsigned int getConfirmTarget() override { return m_wallet->m_confirm_target; } bool hdEnabled() override { return m_wallet->IsHDEnabled(); } - bool canGetAddresses() const override { return m_wallet->CanGetAddresses(); } - bool IsWalletFlagSet(uint64_t flag) override { return m_wallet->IsWalletFlagSet(flag); } + bool canGetAddresses() override { return m_wallet->CanGetAddresses(); } + bool privateKeysDisabled() override { return m_wallet->IsWalletFlagSet(WALLET_FLAG_DISABLE_PRIVATE_KEYS); } OutputType getDefaultAddressType() override { return m_wallet->m_default_address_type; } OutputType getDefaultChangeType() override { return m_wallet->m_default_change_type; } CAmount getDefaultMaxTxFee() override { return m_wallet->m_default_max_tx_fee; } diff --git a/src/interfaces/wallet.h b/src/interfaces/wallet.h index 9476c9f77f..56829289b2 100644 --- a/src/interfaces/wallet.h +++ b/src/interfaces/wallet.h @@ -247,10 +247,10 @@ public: virtual bool hdEnabled() = 0; // Return whether the wallet is blank. - virtual bool canGetAddresses() const = 0; + virtual bool canGetAddresses() = 0; - // check if a certain wallet flag is set. - virtual bool IsWalletFlagSet(uint64_t flag) = 0; + // Return whether private keys enabled. + virtual bool privateKeysDisabled() = 0; // Get default address type. virtual OutputType getDefaultAddressType() = 0; |