mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 06:28:31 +01:00
HD Split: Avoid redundant upgrades
This avoids repeaded upgrades when support for more multiple keyman references is added in the next commit: https://github.com/bitcoin/bitcoin/pull/16341#discussion_r322370108
This commit is contained in:
@@ -384,7 +384,7 @@ bool LegacyScriptPubKeyMan::Upgrade(int prev_version, std::string& error)
|
||||
hd_upgrade = true;
|
||||
}
|
||||
// Upgrade to HD chain split if necessary
|
||||
if (m_storage.CanSupportFeature(FEATURE_HD_SPLIT)) {
|
||||
if (m_storage.CanSupportFeature(FEATURE_HD_SPLIT) && CHDChain::VERSION_HD_CHAIN_SPLIT) {
|
||||
WalletLogPrintf("Upgrading wallet to use HD chain split\n");
|
||||
m_storage.SetMinVersion(FEATURE_PRE_SPLIT_KEYPOOL);
|
||||
split_upgrade = FEATURE_HD_SPLIT > prev_version;
|
||||
|
||||
Reference in New Issue
Block a user