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.
This commit is contained in:
Karl-Johan Alm
2020-03-02 16:35:58 +09:00
parent 037fa770eb
commit 8cd0b86340
6 changed files with 7 additions and 7 deletions

View File

@@ -358,7 +358,7 @@ bool LegacyScriptPubKeyMan::IsHDEnabled() const
return !hdChain.seed_id.IsNull();
}
bool LegacyScriptPubKeyMan::CanGetAddresses(bool internal)
bool LegacyScriptPubKeyMan::CanGetAddresses(bool internal) const
{
LOCK(cs_KeyStore);
// Check if the keypool has keys