mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-06-29 02:11:24 +02:00
wallet: Skip key and script migration for blank wallets
Blank wallets don't have any keys or scripts to migrate
This commit is contained in:
@ -4246,8 +4246,11 @@ util::Result<MigrationResult> MigrateLegacyToDescriptor(const std::string& walle
|
|||||||
// First change to using SQLite
|
// First change to using SQLite
|
||||||
if (!local_wallet->MigrateToSQLite(error)) return util::Error{error};
|
if (!local_wallet->MigrateToSQLite(error)) return util::Error{error};
|
||||||
|
|
||||||
// Do the migration, and cleanup if it fails
|
// Do the migration of keys and scripts for non-blank wallets, and cleanup if it fails
|
||||||
success = DoMigration(*local_wallet, context, error, res);
|
success = local_wallet->IsWalletFlagSet(WALLET_FLAG_BLANK_WALLET);
|
||||||
|
if (!success) {
|
||||||
|
success = DoMigration(*local_wallet, context, error, res);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// In case of reloading failure, we need to remember the wallet dirs to remove
|
// In case of reloading failure, we need to remember the wallet dirs to remove
|
||||||
|
Reference in New Issue
Block a user