wallet: skip backup restoration when using in-memory dbs

By using in-memory databases, we do not have dbs file to delete
and restore.
This commit is contained in:
brunoerg 2024-12-10 19:02:20 -03:00
parent cccac21b77
commit e449f9cd06

View file

@ -4552,7 +4552,7 @@ util::Result<MigrationResult> MigrateLegacyToDescriptor(std::shared_ptr<CWallet>
success = reload_wallet(res.solvables_wallet);
}
}
if (!success) {
if (!success && !in_memory) {
// Migration failed, cleanup
// Before deleting the wallet's directory, copy the backup file to the top-level wallets dir
fs::path temp_backup_location = fsbridge::AbsPathJoin(GetWalletDir(), backup_filename);