diff options
| author | Wladimir J. van der Laan <[email protected]> | 2017-06-29 19:51:48 +0200 |
|---|---|---|
| committer | Wladimir J. van der Laan <[email protected]> | 2017-06-29 19:55:21 +0200 |
| commit | 0c3542e5dec34f43e0c2e171eb52cc95d19c070e (patch) | |
| tree | b5c8a23b86a37fb30b9c2d97d46e7c7cf0de71b8 /src/init.cpp | |
| parent | Merge #10556: Move stop/start functions from utils.py into BitcoinTestFramework (diff) | |
| parent | Report [CANCELLED] instead of [DONE] when shut down during txdb upgrade (diff) | |
| download | discoin-0c3542e5dec34f43e0c2e171eb52cc95d19c070e.tar.xz discoin-0c3542e5dec34f43e0c2e171eb52cc95d19c070e.zip | |
Merge #10660: Allow to cancel the txdb upgrade via splashscreen keypress 'q'
542ce6e Report [CANCELLED] instead of [DONE] when shut down during txdb upgrade (Jonas Schnelli)
83fbea3 Report txdb upgrade not more often then every 10% (Jonas Schnelli)
06c5b6e Show txdb upgrade progress in debug log (Jonas Schnelli)
316fcb5 Allow to cancel the txdb upgrade via splashscreen callback (Jonas Schnelli)
ae09d45 Allow to shut down during txdb upgrade (Jonas Schnelli)
00cb69b [Qt] allow to execute a callback during splashscreen progress (Jonas Schnelli)
Tree-SHA512: 23190f23f441bfd60821e49f8b3698a6bef97eb0e0ee659328e4a7395769ecd1616420eacc38aa1fa0ff62b9de5f13a0098dc798cdec6bff649575cefebc0db2
Diffstat (limited to 'src/init.cpp')
| -rw-r--r-- | src/init.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/init.cpp b/src/init.cpp index d59713258..ec1f18fae 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -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( |