Changeset View
Changeset View
Standalone View
Standalone View
src/bitcoind.cpp
Show First 20 Lines • Show All 66 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); | |||||
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 90 Lines • ▼ Show 20 Lines | |||||
#else | #else | ||||
fprintf( | fprintf( | ||||
stderr, | stderr, | ||||
"Error: -daemon is not supported on this operating system\n"); | "Error: -daemon is not supported on this operating system\n"); | ||||
return false; | return false; | ||||
#endif // HAVE_DECL_DAEMON | #endif // HAVE_DECL_DAEMON | ||||
} | } | ||||
fRet = AppInitMain(config, threadGroup, scheduler); | fRet = AppInitMain(config, httpRPCRequestProcessor, threadGroup, | ||||
scheduler); | |||||
} catch (const std::exception &e) { | } catch (const std::exception &e) { | ||||
PrintExceptionContinue(&e, "AppInit()"); | PrintExceptionContinue(&e, "AppInit()"); | ||||
} catch (...) { | } catch (...) { | ||||
PrintExceptionContinue(nullptr, "AppInit()"); | PrintExceptionContinue(nullptr, "AppInit()"); | ||||
} | } | ||||
if (!fRet) { | if (!fRet) { | ||||
Interrupt(threadGroup); | Interrupt(threadGroup); | ||||
Show All 20 Lines |