mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-03-06 14:19:59 -05:00
wallet: make CanGenerateKeys() const
This method simply checks if HD is or can be enabled and does not require mutability.
This commit is contained in:
parent
dc2d0650fd
commit
ddc93557ad
2 changed files with 2 additions and 2 deletions
|
@ -973,7 +973,7 @@ void LegacyScriptPubKeyMan::LoadKeyPool(int64_t nIndex, const CKeyPool &keypool)
|
|||
mapKeyMetadata[keyid] = CKeyMetadata(keypool.nTime);
|
||||
}
|
||||
|
||||
bool LegacyScriptPubKeyMan::CanGenerateKeys()
|
||||
bool LegacyScriptPubKeyMan::CanGenerateKeys() const
|
||||
{
|
||||
// A wallet can generate keys if it has an HD seed (IsHDEnabled) or it is a non-HD wallet (pre FEATURE_HD)
|
||||
LOCK(cs_KeyStore);
|
||||
|
|
|
@ -410,7 +410,7 @@ public:
|
|||
bool ImportScriptPubKeys(const std::set<CScript>& script_pub_keys, const bool have_solving_data, const int64_t timestamp) EXCLUSIVE_LOCKS_REQUIRED(cs_KeyStore);
|
||||
|
||||
/* Returns true if the wallet can generate new keys */
|
||||
bool CanGenerateKeys();
|
||||
bool CanGenerateKeys() const;
|
||||
|
||||
/* Generates a new HD seed (will not be activated) */
|
||||
CPubKey GenerateNewSeed();
|
||||
|
|
Loading…
Add table
Reference in a new issue