aboutsummaryrefslogtreecommitdiff
path: root/src/wallet
diff options
context:
space:
mode:
authorglozow <gloriajzhao@gmail.com>2023-07-06 10:47:29 +0100
committerglozow <gloriajzhao@gmail.com>2023-07-06 10:47:41 +0100
commitecf3baffc0b64fe0418b69bcfa5faeb83cff6246 (patch)
treeffbaab91a62ecd345720fe750b0f0f6c0ef88d62 /src/wallet
parentbc4f6b13feb29146b7e10e86f93dc7f6fb6937f2 (diff)
parent8fbb6e99bfc85a1b9003cae402a7335843a86abd (diff)
Merge bitcoin/bitcoin#27869: wallet: Give deprecation warning when loading a legacy wallet
8fbb6e99bfc85a1b9003cae402a7335843a86abd wallet: Give deprecation warning when loading a legacy wallet (Andrew Chow) Pull request description: Next step in legacy wallet deprecation. ACKs for top commit: S3RK: reACK 8fbb6e99bfc85a1b9003cae402a7335843a86abd jonatack: re-ACK 8fbb6e99bfc85a1b9003cae402a7335843a86abd Tree-SHA512: 902984b09452926cf199f06e5fb56e4985325cdd5e0dcc829992158488f42d5fbc33e9a30a29303feac24c8315193e8d31712022e2a0503abd6b67169a0027f4
Diffstat (limited to 'src/wallet')
-rw-r--r--src/wallet/wallet.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp
index 5d99fb92a2..aba6b8bfa8 100644
--- a/src/wallet/wallet.cpp
+++ b/src/wallet/wallet.cpp
@@ -245,6 +245,11 @@ std::shared_ptr<CWallet> LoadWalletInternal(WalletContext& context, const std::s
return nullptr;
}
+ // Legacy wallets are being deprecated, warn if the loaded wallet is legacy
+ if (!wallet->IsWalletFlagSet(WALLET_FLAG_DESCRIPTORS)) {
+ warnings.push_back(_("Wallet loaded successfully. The legacy wallet type is being deprecated and support for creating and opening legacy wallets will be removed in the future. Legacy wallets can be migrated to a descriptor wallet with migratewallet."));
+ }
+
NotifyWalletLoaded(context, wallet);
AddWallet(context, wallet);
wallet->postInitProcess();