diff options
author | Pieter Wuille <pieter.wuille@gmail.com> | 2016-11-30 16:07:21 -0800 |
---|---|---|
committer | Pieter Wuille <pieter.wuille@gmail.com> | 2016-11-30 16:11:14 -0800 |
commit | a143b88dbd4971ecfdd1d39a494489c8f2db0344 (patch) | |
tree | 1c75ef1af0165bd8c43d40b08f0f6dbc186d2e87 /src/qt | |
parent | 56bee4986d1195fe6d05f6357ce43a007bab8071 (diff) | |
parent | deec83fd2cc8af39c28c74161650fbff432502ce (diff) |
Merge #9010: Split up AppInit2 into multiple phases, daemonize after datadir lock errors
deec83f init: Get rid of fServer flag (Wladimir J. van der Laan)
16ca0bf init: Try to aquire datadir lock before and after daemonization (Wladimir J. van der Laan)
0cc8b6b init: Split up AppInit2 into multiple phases (Wladimir J. van der Laan)
Diffstat (limited to 'src/qt')
-rw-r--r-- | src/qt/bitcoin.cpp | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/qt/bitcoin.cpp b/src/qt/bitcoin.cpp index d7452f308e..4f48e21a22 100644 --- a/src/qt/bitcoin.cpp +++ b/src/qt/bitcoin.cpp @@ -268,7 +268,22 @@ void BitcoinCore::initialize() try { qDebug() << __func__ << ": Running AppInit2 in thread"; - int rv = AppInit2(threadGroup, scheduler); + if (!AppInitBasicSetup()) + { + Q_EMIT initializeResult(false); + return; + } + if (!AppInitParameterInteraction()) + { + Q_EMIT initializeResult(false); + return; + } + if (!AppInitSanityChecks()) + { + Q_EMIT initializeResult(false); + return; + } + int rv = AppInitMain(threadGroup, scheduler); Q_EMIT initializeResult(rv); } catch (const std::exception& e) { handleRunawayException(&e); |