aboutsummaryrefslogtreecommitdiff
path: root/src/init.h
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/init.h
parent67728a389ccf128fc25262668b2a23f8ef73e1d6 (diff)
downloadbitcoin-0cc8b6bc44bea29e24fa4e13d8a9bbe4f1483680.tar.xz
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/init.h')
-rw-r--r--src/init.h25
1 files changed, 24 insertions, 1 deletions
diff --git a/src/init.h b/src/init.h
index 63e07ccb3c..1b87e0ec52 100644
--- a/src/init.h
+++ b/src/init.h
@@ -25,7 +25,30 @@ void Shutdown();
void InitLogging();
//!Parameter interaction: change current parameters depending on various rules
void InitParameterInteraction();
-bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler);
+
+/** Initialize bitcoin core: Basic context setup.
+ * @note This can be done before daemonization.
+ * @pre Parameters should be parsed and config file should be read.
+ */
+bool AppInitBasicSetup();
+/**
+ * Initialization: parameter interaction.
+ * @note This can be done before daemonization.
+ * @pre Parameters should be parsed and config file should be read, AppInitBasicSetup should have been called.
+ */
+bool AppInitParameterInteraction();
+/**
+ * Initialization sanity checks: ecc init, sanity checks, dir lock.
+ * @note This can be done before daemonization.
+ * @pre Parameters should be parsed and config file should be read, AppInitParameterInteraction should have been called.
+ */
+bool AppInitSanityChecks();
+/**
+ * Bitcoin core main initialization.
+ * @note This should only be done after daemonization.
+ * @pre Parameters should be parsed and config file should be read, AppInitSanityChecks should have been called.
+ */
+bool AppInitMain(boost::thread_group& threadGroup, CScheduler& scheduler);
/** The help message mode determines what help message to show */
enum HelpMessageMode {