diff options
| author | Wladimir J. van der Laan <[email protected]> | 2016-10-25 11:34:27 +0200 |
|---|---|---|
| committer | Wladimir J. van der Laan <[email protected]> | 2016-11-29 12:47:13 +0100 |
| commit | 0cc8b6bc44bea29e24fa4e13d8a9bbe4f1483680 (patch) | |
| tree | 8688518c33a37cd755b81103c72b2cb69efbcad6 /src/qt/bitcoin.cpp | |
| parent | Merge #9004: Clarify `listenonion` (diff) | |
| download | discoin-0cc8b6bc44bea29e24fa4e13d8a9bbe4f1483680.tar.xz discoin-0cc8b6bc44bea29e24fa4e13d8a9bbe4f1483680.zip | |
init: Split up AppInit2 into multiple phases
This allows doing some of the steps before e.g. daemonization and some
fater.
Diffstat (limited to 'src/qt/bitcoin.cpp')
| -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 9986af495..5e1a41d5a 100644 --- a/src/qt/bitcoin.cpp +++ b/src/qt/bitcoin.cpp @@ -267,7 +267,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); |