Changeset View
Changeset View
Standalone View
Standalone View
src/bitcoind.cpp
Show First 20 Lines • Show All 65 Lines • ▼ Show 20 Lines | |||||
bool AppInit(int argc, char *argv[]) { | bool AppInit(int argc, char *argv[]) { | ||||
boost::thread_group threadGroup; | boost::thread_group threadGroup; | ||||
CScheduler scheduler; | CScheduler scheduler; | ||||
// FIXME: Ideally, we'd like to build the config here, but that's currently | // FIXME: Ideally, we'd like to build the config here, but that's currently | ||||
// not possible as the whole application has too many global state. However, | // not possible as the whole application has too many global state. However, | ||||
// this is a first step. | // this is a first step. | ||||
auto &config = const_cast<Config &>(GetConfig()); | auto &config = const_cast<Config &>(GetConfig()); | ||||
HTTPRPCRequestProcessor httpRPCRequestProcessor(config); | RPCServer rpcServer; | ||||
HTTPRPCRequestProcessor httpRPCRequestProcessor(config, rpcServer); | |||||
bool fRet = false; | bool fRet = false; | ||||
// | // | ||||
// Parameters | // Parameters | ||||
// | // | ||||
// If Qt is used, parameters/bitcoin.conf are parsed in qt/bitcoin.cpp's | // If Qt is used, parameters/bitcoin.conf are parsed in qt/bitcoin.cpp's | ||||
// main() | // main() | ||||
▲ Show 20 Lines • Show All 60 Lines • ▼ Show 20 Lines | try { | ||||
// Set this early so that parameter interactions go to console | // Set this early so that parameter interactions go to console | ||||
InitLogging(); | InitLogging(); | ||||
InitParameterInteraction(); | InitParameterInteraction(); | ||||
if (!AppInitBasicSetup()) { | if (!AppInitBasicSetup()) { | ||||
// InitError will have been called with detailed error, which ends | // InitError will have been called with detailed error, which ends | ||||
// up on console | // up on console | ||||
exit(1); | exit(1); | ||||
} | } | ||||
if (!AppInitParameterInteraction(config)) { | if (!AppInitParameterInteraction(config, rpcServer)) { | ||||
// InitError will have been called with detailed error, which ends | // InitError will have been called with detailed error, which ends | ||||
// up on console | // up on console | ||||
exit(1); | exit(1); | ||||
} | } | ||||
if (!AppInitSanityChecks()) { | if (!AppInitSanityChecks()) { | ||||
// InitError will have been called with detailed error, which ends | // InitError will have been called with detailed error, which ends | ||||
// up on console | // up on console | ||||
exit(1); | exit(1); | ||||
▲ Show 20 Lines • Show All 50 Lines • Show Last 20 Lines |