wallet: Always write last hardened cache flag in migrated wallets

This commit is contained in:
Ava Chow committed 2025-07-31 10:29:32 -07:00
1 parent 8a08eef645
commit 88b0647f02
1 file changed
+1 -1
+1 -1
View File
@@ -3851,7 +3851,7 @@ util::Result<void> 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()) {