Skip to content

Commit

Permalink
discourage refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
knst committed Jan 16, 2024
1 parent f60597e commit b159940
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/wallet/wallet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4894,14 +4894,14 @@ bool CWallet::UpgradeWallet(int version, bilingual_str& error)
WalletLogPrintf("Allowing wallet upgrade up to %i\n", nMaxVersion);
}

// Discourage users to skip passphrase for HD wallets
if (nMaxVersion >= FEATURE_HD && !IsHDEnabled()) {
error = Untranslated("You should use upgradetohd RPC to upgrade non-HD wallet to HD");
if (nMaxVersion < GetVersion()) {
error = Untranslated("Cannot downgrade wallet");
return false;
}

if (nMaxVersion < GetVersion()) {
error = Untranslated("Cannot downgrade wallet");
// Discourage users to skip passphrase for HD wallets
if (nMaxVersion >= FEATURE_HD && !IsHDEnabled()) {
error = Untranslated("You should use upgradetohd RPC to upgrade non-HD wallet to HD");
return false;
}

Expand Down

0 comments on commit b159940

Please sign in to comment.