Fix crash on splash screen when wallet fails to load (#3629)

This commit is contained in:
UdjinM6 2020-07-28 23:50:23 +03:00 committed by GitHub
parent b7b207d7ad
commit 469771d28e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4197,8 +4197,6 @@ DBErrors CWallet::LoadWallet(bool& fFirstRunRet)
if (nLoadWalletRet != DBErrors::LOAD_OK)
return nLoadWalletRet;
uiInterface.LoadWallet(this);
return DBErrors::LOAD_OK;
}
@ -5253,6 +5251,7 @@ CWallet* CWallet::CreateWalletFromFile(const std::string& name, const fs::path&
InitError(_("Failed to rescan the wallet during initialization"));
return nullptr;
}
uiInterface.LoadWallet(walletInstance); // TODO: move it up when backporting 13063
walletInstance->ScanForWalletTransactions(pindexRescan, nullptr, reserver, true);
}
LogPrintf(" rescan %15dms\n", GetTimeMillis() - nStart);