Merge 159f89c118 into merged_master (Bitcoin PR bitcoin/bitcoin#24365)

This commit is contained in:
Byron Hambly 2023-07-02 17:03:39 +00:00
commit 7e989c64b3
2 changed files with 17 additions and 0 deletions

View file

@ -476,6 +476,12 @@ bool LegacyScriptPubKeyMan::CanGetAddresses(bool internal) const
bool LegacyScriptPubKeyMan::Upgrade(int prev_version, int new_version, bilingual_str& error)
{
LOCK(cs_KeyStore);
if (m_storage.IsWalletFlagSet(WALLET_FLAG_DISABLE_PRIVATE_KEYS)) {
// Nothing to do here if private keys are not enabled
return true;
}
bool hd_upgrade = false;
bool split_upgrade = false;
if (IsFeatureSupported(new_version, FEATURE_HD) && !IsHDEnabled()) {