Changeset View
Changeset View
Standalone View
Standalone View
src/init.h
Show All 18 Lines | |||||
class RPCServer; | class RPCServer; | ||||
namespace interfaces { | namespace interfaces { | ||||
class Chain; | class Chain; | ||||
class ChainClient; | class ChainClient; | ||||
} // namespace interfaces | } // namespace interfaces | ||||
//! Pointers to interfaces used during init and destroyed on shutdown. | //! Pointers to interfaces used during init and destroyed on shutdown. | ||||
struct InitInterfaces { | struct NodeContext { | ||||
std::unique_ptr<interfaces::Chain> chain; | std::unique_ptr<interfaces::Chain> chain; | ||||
std::vector<std::unique_ptr<interfaces::ChainClient>> chain_clients; | std::vector<std::unique_ptr<interfaces::ChainClient>> chain_clients; | ||||
}; | }; | ||||
namespace boost { | namespace boost { | ||||
class thread_group; | class thread_group; | ||||
} // namespace boost | } // namespace boost | ||||
/** Interrupt threads */ | /** Interrupt threads */ | ||||
void Interrupt(); | void Interrupt(); | ||||
void Shutdown(InitInterfaces &interfaces); | void Shutdown(NodeContext &node); | ||||
//! 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: Basic context setup. | * Initialize bitcoin: Basic context setup. | ||||
* @note This can be done before daemonization. | * @note This can be done before daemonization. | ||||
Show All 28 Lines | |||||
/** | /** | ||||
* Bitcoin main initialization. | * Bitcoin main initialization. | ||||
* @note This should only be done after daemonization. | * @note This should only be done after daemonization. | ||||
* @pre Parameters should be parsed and config file should be read, | * @pre Parameters should be parsed and config file should be read, | ||||
* AppInitLockDataDirectory should have been called. | * AppInitLockDataDirectory should have been called. | ||||
*/ | */ | ||||
bool AppInitMain(Config &config, RPCServer &rpcServer, | bool AppInitMain(Config &config, RPCServer &rpcServer, | ||||
HTTPRPCRequestProcessor &httpRPCRequestProcessor, | HTTPRPCRequestProcessor &httpRPCRequestProcessor, | ||||
InitInterfaces &interfaces); | NodeContext &node); | ||||
/** | /** | ||||
* Setup the arguments for gArgs. | * Setup the arguments for gArgs. | ||||
*/ | */ | ||||
void SetupServerArgs(); | void SetupServerArgs(); | ||||
/** Returns licensing information (for -version) */ | /** Returns licensing information (for -version) */ | ||||
std::string LicenseInfo(); | std::string LicenseInfo(); | ||||
#endif // BITCOIN_INIT_H | #endif // BITCOIN_INIT_H |