1 // Copyright (c) 2009-2010 Satoshi Nakamoto
2 // Copyright (c) 2009-2016 The Bitcoin Core developers
3 // Distributed under the MIT software license, see the accompanying
4 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
20 bool ShutdownRequested();
21 /** Interrupt threads */
22 void Interrupt(boost::thread_group
& threadGroup
);
24 //!Initialize the logging infrastructure
26 //!Parameter interaction: change current parameters depending on various rules
27 void InitParameterInteraction();
29 /** Initialize bitcoin core: Basic context setup.
30 * @note This can be done before daemonization. Do not call Shutdown() if this function fails.
31 * @pre Parameters should be parsed and config file should be read.
33 bool AppInitBasicSetup();
35 * Initialization: parameter interaction.
36 * @note This can be done before daemonization. Do not call Shutdown() if this function fails.
37 * @pre Parameters should be parsed and config file should be read, AppInitBasicSetup should have been called.
39 bool AppInitParameterInteraction();
41 * Initialization sanity checks: ecc init, sanity checks, dir lock.
42 * @note This can be done before daemonization. Do not call Shutdown() if this function fails.
43 * @pre Parameters should be parsed and config file should be read, AppInitParameterInteraction should have been called.
45 bool AppInitSanityChecks();
47 * Lock bitcoin core data directory.
48 * @note This should only be done after daemonization. Do not call Shutdown() if this function fails.
49 * @pre Parameters should be parsed and config file should be read, AppInitSanityChecks should have been called.
51 bool AppInitLockDataDirectory();
53 * Bitcoin core main initialization.
54 * @note This should only be done after daemonization. Call Shutdown() if this function fails.
55 * @pre Parameters should be parsed and config file should be read, AppInitLockDataDirectory should have been called.
57 bool AppInitMain(boost::thread_group
& threadGroup
, CScheduler
& scheduler
);
59 /** The help message mode determines what help message to show */
60 enum HelpMessageMode
{
65 /** Help for options shared between UI and daemon (for -help) */
66 std::string
HelpMessage(HelpMessageMode mode
);
67 /** Returns licensing information (for -version) */
68 std::string
LicenseInfo();
70 #endif // BITCOIN_INIT_H