aboutsummaryrefslogtreecommitdiff
path: root/src/qt/bitcoin.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2016-10-25 11:34:27 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2016-11-29 12:47:13 +0100
commit0cc8b6bc44bea29e24fa4e13d8a9bbe4f1483680 (patch)
tree8688518c33a37cd755b81103c72b2cb69efbcad6 /src/qt/bitcoin.cpp
parent67728a389ccf128fc25262668b2a23f8ef73e1d6 (diff)
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.cpp17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/qt/bitcoin.cpp b/src/qt/bitcoin.cpp
index 9986af4957..5e1a41d5a7 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);