Changeset View
Changeset View
Standalone View
Standalone View
src/init.cpp
Show First 20 Lines • Show All 1,286 Lines • ▼ Show 20 Lines | void InitLogging() { | ||||
LogPrintf("%s version %s\n", CLIENT_NAME, FormatFullVersion()); | LogPrintf("%s version %s\n", CLIENT_NAME, FormatFullVersion()); | ||||
} | } | ||||
namespace { // Variables internal to initialization process only | namespace { // Variables internal to initialization process only | ||||
int nMaxConnections; | int nMaxConnections; | ||||
int nUserMaxConnections; | int nUserMaxConnections; | ||||
int nFD; | int nFD; | ||||
ServiceFlags nLocalServices = NODE_NETWORK; | ServiceFlags nLocalServices = ServiceFlags(NODE_NETWORK | NODE_NETWORK_LIMITED); | ||||
} // namespace | } // namespace | ||||
[[noreturn]] static void new_handler_terminate() { | [[noreturn]] static void new_handler_terminate() { | ||||
// Rather than throwing std::bad-alloc if allocation fails, terminate | // Rather than throwing std::bad-alloc if allocation fails, terminate | ||||
// immediately to (try to) avoid chain corruption. Since LogPrintf may | // immediately to (try to) avoid chain corruption. Since LogPrintf may | ||||
// itself allocate memory, set the handler directly to terminate first. | // itself allocate memory, set the handler directly to terminate first. | ||||
std::set_new_handler(std::terminate); | std::set_new_handler(std::terminate); | ||||
LogPrintf("Error: Out of memory. Terminating.\n"); | LogPrintf("Error: Out of memory. Terminating.\n"); | ||||
▲ Show 20 Lines • Show All 1,086 Lines • Show Last 20 Lines |