Wallet/Migration: If loading the new watchonly or solvables wallet fails, log the correct wallet name in error message

This commit is contained in:
Luke Dashjr 2026-01-15 19:03:23 +00:00
parent 7475d134f6
commit 60f529027c

View File

@ -4532,7 +4532,7 @@ util::Result<MigrationResult> MigrateLegacyToDescriptor(std::shared_ptr<CWallet>
to_reload = LoadWallet(context, name, /*load_on_start=*/std::nullopt, options, status, error, warnings);
if (!to_reload) {
LogError("Failed to load wallet '%s' after migration. Rolling back migration to preserve consistency. "
"Error cause: %s\n", wallet_name, error.original);
"Error cause: %s\n", name, error.original);
return false;
}
return true;