0
0
mirror of https://github.com/namecoin/namecoin-core synced 2025-10-06 16:42:49 +02:00

wallet: Always write last hardened cache flag in migrated wallets

This commit is contained in:
Ava Chow
2025-07-21 12:59:15 -07:00
parent 8a08eef645
commit 88b0647f02

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()) {