We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7e3dbe4 commit 31c0df0Copy full SHA for 31c0df0
src/wallet/wallet.cpp
@@ -4398,6 +4398,11 @@ util::Result<MigrationResult> MigrateLegacyToDescriptor(const std::string& walle
4398
return util::Error{_("Error: This wallet is already a descriptor wallet")};
4399
}
4400
4401
+ // Flush chain state before unloading wallet
4402
+ CBlockLocator locator;
4403
+ WITH_LOCK(wallet->cs_wallet, context.chain->findBlock(wallet->GetLastBlockHash(), FoundBlock().locator(locator)));
4404
+ if (!locator.IsNull()) wallet->chainStateFlushed(ChainstateRole::NORMAL, locator);
4405
+
4406
if (!RemoveWallet(context, wallet, /*load_on_start=*/std::nullopt, warnings)) {
4407
return util::Error{_("Unable to unload the wallet before migrating")};
4408
0 commit comments