Changeset View
Changeset View
Standalone View
Standalone View
src/init.h
// Copyright (c) 2009-2010 Satoshi Nakamoto | // Copyright (c) 2009-2010 Satoshi Nakamoto | ||||
// Copyright (c) 2009-2016 The Bitcoin Core developers | // Copyright (c) 2009-2016 The Bitcoin Core developers | ||||
// Copyright (c) 2018 The Bitcoin developers | |||||
// Distributed under the MIT software license, see the accompanying | // Distributed under the MIT software license, see the accompanying | ||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php. | // file COPYING or http://www.opensource.org/licenses/mit-license.php. | ||||
#ifndef BITCOIN_INIT_H | #ifndef BITCOIN_INIT_H | ||||
#define BITCOIN_INIT_H | #define BITCOIN_INIT_H | ||||
#include <string> | #include <string> | ||||
Show All 12 Lines | |||||
/** Interrupt threads */ | /** Interrupt threads */ | ||||
void Interrupt(boost::thread_group &threadGroup); | void Interrupt(boost::thread_group &threadGroup); | ||||
void Shutdown(); | void Shutdown(); | ||||
//! Initialize the logging infrastructure | //! Initialize the logging infrastructure | ||||
void InitLogging(); | void InitLogging(); | ||||
//! Parameter interaction: change current parameters depending on various rules | //! Parameter interaction: change current parameters depending on various rules | ||||
void InitParameterInteraction(); | void InitParameterInteraction(); | ||||
/** Initialize bitcoin core: Basic context setup. | /** | ||||
* Initialize bitcoin: Basic context setup. | |||||
* @note This can be done before daemonization. | * @note This can be done before daemonization. | ||||
* Do not call Shutdown() if this function fails. | |||||
* @pre Parameters should be parsed and config file should be read. | * @pre Parameters should be parsed and config file should be read. | ||||
*/ | */ | ||||
bool AppInitBasicSetup(); | bool AppInitBasicSetup(); | ||||
/** | /** | ||||
* Initialization: parameter interaction. | * Initialization: parameter interaction. | ||||
* @note This can be done before daemonization. | * @note This can be done before daemonization. | ||||
* Do not call Shutdown() if this function fails. | |||||
* @pre Parameters should be parsed and config file should be read, | * @pre Parameters should be parsed and config file should be read, | ||||
* AppInitBasicSetup should have been called. | * AppInitBasicSetup should have been called. | ||||
*/ | */ | ||||
bool AppInitParameterInteraction(Config &config, RPCServer &rpcServer); | bool AppInitParameterInteraction(Config &config, RPCServer &rpcServer); | ||||
/** | /** | ||||
* Initialization sanity checks: ecc init, sanity checks, dir lock. | * Initialization sanity checks: ecc init, sanity checks, dir lock. | ||||
* @note This can be done before daemonization. | * @note This can be done before daemonization. | ||||
* Do not call Shutdown() if this function fails. | |||||
* @pre Parameters should be parsed and config file should be read, | * @pre Parameters should be parsed and config file should be read, | ||||
* AppInitParameterInteraction should have been called. | * AppInitParameterInteraction should have been called. | ||||
*/ | */ | ||||
bool AppInitSanityChecks(); | bool AppInitSanityChecks(); | ||||
/** | /** | ||||
* Bitcoin core main initialization. | * Lock bitcoin data directory. | ||||
* @note This should only be done after daemonization. | * @note This should only be done after daemonization. | ||||
* Do not call Shutdown() if this function fails. | |||||
* @pre Parameters should be parsed and config file should be read, | * @pre Parameters should be parsed and config file should be read, | ||||
* AppInitSanityChecks should have been called. | * AppInitSanityChecks should have been called. | ||||
*/ | */ | ||||
bool AppInitLockDataDirectory(); | |||||
/** | |||||
* Bitcoin main initialization. | |||||
* @note This should only be done after daemonization. | |||||
* @pre Parameters should be parsed and config file should be read, | |||||
* AppInitLockDataDirectory should have been called. | |||||
*/ | |||||
bool AppInitMain(Config &config, | bool AppInitMain(Config &config, | ||||
HTTPRPCRequestProcessor &httpRPCRequestProcessor, | HTTPRPCRequestProcessor &httpRPCRequestProcessor, | ||||
boost::thread_group &threadGroup, CScheduler &scheduler); | boost::thread_group &threadGroup, CScheduler &scheduler); | ||||
/** The help message mode determines what help message to show */ | /** The help message mode determines what help message to show */ | ||||
enum HelpMessageMode { HMM_BITCOIND, HMM_BITCOIN_QT }; | enum HelpMessageMode { HMM_BITCOIND, HMM_BITCOIN_QT }; | ||||
/** Help for options shared between UI and daemon (for -help) */ | /** Help for options shared between UI and daemon (for -help) */ | ||||
std::string HelpMessage(HelpMessageMode mode); | std::string HelpMessage(HelpMessageMode mode); | ||||
/** Returns licensing information (for -version) */ | /** Returns licensing information (for -version) */ | ||||
std::string LicenseInfo(); | std::string LicenseInfo(); | ||||
#endif // BITCOIN_INIT_H | #endif // BITCOIN_INIT_H |