From 88b0647f027a608acb61ec32329d19f8e5b0a9fd Mon Sep 17 00:00:00 2001 From: Ava Chow Date: Mon, 21 Jul 2025 12:59:15 -0700 Subject: [PATCH] wallet: Always write last hardened cache flag in migrated wallets --- src/wallet/wallet.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 91a494c379f..2373f30a2c0 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -3851,7 +3851,7 @@ util::Result CWallet::ApplyMigrationData(WalletBatch& local_wallet_batch, m_internal_spk_managers.clear(); // Setup new descriptors (only if we are migrating any key material) - SetWalletFlagWithDB(local_wallet_batch, WALLET_FLAG_DESCRIPTORS); + SetWalletFlagWithDB(local_wallet_batch, WALLET_FLAG_DESCRIPTORS | WALLET_FLAG_LAST_HARDENED_XPUB_CACHED); if (has_spendable_material && !IsWalletFlagSet(WALLET_FLAG_DISABLE_PRIVATE_KEYS)) { // Use the existing master key if we have it if (data.master_key.key.IsValid()) {