Skip to content

Commit 415afcc

Browse files
committed
HD Split: Avoid redundant upgrades
This avoids repeaded upgrades when support for more multiple keyman references is added in the next commit: bitcoin/bitcoin#16341 (comment)
1 parent 01b4511 commit 415afcc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/wallet/scriptpubkeyman.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@ bool LegacyScriptPubKeyMan::Upgrade(int prev_version, std::string& error)
384384
hd_upgrade = true;
385385
}
386386
// Upgrade to HD chain split if necessary
387-
if (m_storage.CanSupportFeature(FEATURE_HD_SPLIT)) {
387+
if (m_storage.CanSupportFeature(FEATURE_HD_SPLIT) && CHDChain::VERSION_HD_CHAIN_SPLIT) {
388388
WalletLogPrintf("Upgrading wallet to use HD chain split\n");
389389
m_storage.SetMinVersion(FEATURE_PRE_SPLIT_KEYPOOL);
390390
split_upgrade = FEATURE_HD_SPLIT > prev_version;

0 commit comments

Comments
 (0)