mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-14 12:43:40 +02:00
Allow to shut down during txdb upgrade
This commit is contained in:
parent
00cb69bc86
commit
ae09d4583b
2 changed files with 6 additions and 2 deletions
|
|
@ -1358,7 +1358,7 @@ bool AppInitMain(boost::thread_group& threadGroup, CScheduler& scheduler)
|
|||
LogPrintf("* Using %.1fMiB for in-memory UTXO set (plus up to %.1fMiB of unused mempool space)\n", nCoinCacheUsage * (1.0 / 1024 / 1024), nMempoolSizeMax * (1.0 / 1024 / 1024));
|
||||
|
||||
bool fLoaded = false;
|
||||
while (!fLoaded) {
|
||||
while (!fLoaded && !fRequestShutdown) {
|
||||
bool fReset = fReindex;
|
||||
std::string strLoadError;
|
||||
|
||||
|
|
@ -1389,6 +1389,7 @@ bool AppInitMain(boost::thread_group& threadGroup, CScheduler& scheduler)
|
|||
break;
|
||||
}
|
||||
}
|
||||
if (fRequestShutdown) break;
|
||||
|
||||
if (!LoadBlockIndex(chainparams)) {
|
||||
strLoadError = _("Error loading block database");
|
||||
|
|
@ -1466,7 +1467,7 @@ bool AppInitMain(boost::thread_group& threadGroup, CScheduler& scheduler)
|
|||
fLoaded = true;
|
||||
} while(false);
|
||||
|
||||
if (!fLoaded) {
|
||||
if (!fLoaded && !fRequestShutdown) {
|
||||
// first suggest a reindex
|
||||
if (!fReset) {
|
||||
bool fRet = uiInterface.ThreadSafeQuestion(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue