diff options
author | Karl-Johan Alm <karljohan-alm@garage.co.jp> | 2020-03-02 16:35:58 +0900 |
---|---|---|
committer | Karl-Johan Alm <karljohan-alm@garage.co.jp> | 2020-03-02 17:26:30 +0900 |
commit | 8cd0b86340870d8f359e4ae26880e03ea36818ab (patch) | |
tree | b25041df17bf166b6a3750b8c57ef4c6bdbe6f87 /src/wallet/scriptpubkeyman.h | |
parent | 037fa770eb1ed5152b3ef2c5d3fb2a812d3ef944 (diff) |
wallet: make CanGetAddresses() const
CWallet::CanGetAddresses() is used to check whether the wallet has available or is able to produce keys for addresses. It uses the ScriptPubKeyMan::CanGetAddresses(), which in turn uses the const KeypoolCountExternalKeys() method, all which do counting and no modifications.
Diffstat (limited to 'src/wallet/scriptpubkeyman.h')
-rw-r--r-- | src/wallet/scriptpubkeyman.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/wallet/scriptpubkeyman.h b/src/wallet/scriptpubkeyman.h index 213084c523..9d227ad3bf 100644 --- a/src/wallet/scriptpubkeyman.h +++ b/src/wallet/scriptpubkeyman.h @@ -184,7 +184,7 @@ public: virtual bool IsHDEnabled() const { return false; } /* Returns true if the wallet can give out new addresses. This means it has keys in the keypool or can generate new keys */ - virtual bool CanGetAddresses(bool internal = false) { return false; } + virtual bool CanGetAddresses(bool internal = false) const { return false; } /** Upgrades the wallet to the specified version */ virtual bool Upgrade(int prev_version, std::string& error) { return false; } @@ -344,7 +344,7 @@ public: const CKeyMetadata* GetMetadata(const CTxDestination& dest) const override; - bool CanGetAddresses(bool internal = false) override; + bool CanGetAddresses(bool internal = false) const override; std::unique_ptr<SigningProvider> GetSigningProvider(const CScript& script) const override; |