wallet: remove dead code in legacy wallet migration

A discussion on a previous PR 32481 related to legacy wallet dead
code removal made me realize that checking if the legacy
wallet was loaded prior to the start of the migration is not
required ever since legacy wallets can't be loaded in the first
place. I also verified that the `load_on_start` persistent
setting can also not cause the legacy wallets to be loaded, which
further makes the case for removal of the above mentioned checks
during migration.
The current test coverage also shows these lines uncovered.
This commit is contained in:
rkrux
2025-06-16 12:55:32 +05:30
parent 49d5f1f2c6
commit 0f86da382d
3 changed files with 10 additions and 31 deletions

View File

@@ -66,7 +66,7 @@ static void WalletMigration(benchmark::Bench& bench)
bench.epochs(/*numEpochs=*/1).epochIterations(/*numIters=*/1) // run the migration exactly once
.run([&] {
auto res{MigrateLegacyToDescriptor(std::move(wallet), /*passphrase=*/"", *loader->context(), /*was_loaded=*/false)};
auto res{MigrateLegacyToDescriptor(std::move(wallet), /*passphrase=*/"", *loader->context())};
assert(res);
assert(res->wallet);
assert(res->watchonly_wallet);