Changeset View
Changeset View
Standalone View
Standalone View
src/init.cpp
Show First 20 Lines • Show All 1,341 Lines • ▼ Show 20 Lines | #ifndef WIN32 | ||||
signal(SIGPIPE, SIG_IGN); | signal(SIGPIPE, SIG_IGN); | ||||
#endif | #endif | ||||
std::set_new_handler(new_handler_terminate); | std::set_new_handler(new_handler_terminate); | ||||
return true; | return true; | ||||
} | } | ||||
bool AppInitParameterInteraction(Config &config) { | bool AppInitParameterInteraction(Config &config, RPCServer &rpcServer) { | ||||
const CChainParams &chainparams = config.GetChainParams(); | const CChainParams &chainparams = config.GetChainParams(); | ||||
// Step 2: parameter interactions | // Step 2: parameter interactions | ||||
// also see: InitParameterInteraction() | // also see: InitParameterInteraction() | ||||
// if using block pruning, then disallow txindex | // if using block pruning, then disallow txindex | ||||
if (gArgs.GetArg("-prune", 0)) { | if (gArgs.GetArg("-prune", 0)) { | ||||
if (gArgs.GetBoolArg("-txindex", DEFAULT_TXINDEX)) { | if (gArgs.GetBoolArg("-txindex", DEFAULT_TXINDEX)) { | ||||
▲ Show 20 Lines • Show All 211 Lines • ▼ Show 20 Lines | if (nPruneArg == 1) { | ||||
MIN_DISK_SPACE_FOR_BLOCK_FILES / 1024 / 1024)); | MIN_DISK_SPACE_FOR_BLOCK_FILES / 1024 / 1024)); | ||||
} | } | ||||
LogPrintf("Prune configured to target %uMiB on disk for block and undo " | LogPrintf("Prune configured to target %uMiB on disk for block and undo " | ||||
"files.\n", | "files.\n", | ||||
nPruneTarget / 1024 / 1024); | nPruneTarget / 1024 / 1024); | ||||
fPruneMode = true; | fPruneMode = true; | ||||
} | } | ||||
RegisterAllRPCCommands(tableRPC); | RegisterAllRPCCommands(config, rpcServer, tableRPC); | ||||
#ifdef ENABLE_WALLET | #ifdef ENABLE_WALLET | ||||
RegisterWalletRPCCommands(tableRPC); | RegisterWalletRPCCommands(tableRPC); | ||||
RegisterDumpRPCCommands(tableRPC); | RegisterDumpRPCCommands(tableRPC); | ||||
#endif | #endif | ||||
nConnectTimeout = gArgs.GetArg("-timeout", DEFAULT_CONNECT_TIMEOUT); | nConnectTimeout = gArgs.GetArg("-timeout", DEFAULT_CONNECT_TIMEOUT); | ||||
if (nConnectTimeout <= 0) { | if (nConnectTimeout <= 0) { | ||||
nConnectTimeout = DEFAULT_CONNECT_TIMEOUT; | nConnectTimeout = DEFAULT_CONNECT_TIMEOUT; | ||||
▲ Show 20 Lines • Show All 724 Lines • Show Last 20 Lines |