Changeset View
Changeset View
Standalone View
Standalone View
src/init.cpp
Show All 22 Lines | |||||
#include "miner.h" | #include "miner.h" | ||||
#include "net.h" | #include "net.h" | ||||
#include "net_processing.h" | #include "net_processing.h" | ||||
#include "netbase.h" | #include "netbase.h" | ||||
#include "policy/policy.h" | #include "policy/policy.h" | ||||
#include "rpc/register.h" | #include "rpc/register.h" | ||||
#include "rpc/server.h" | #include "rpc/server.h" | ||||
#include "scheduler.h" | #include "scheduler.h" | ||||
#include "script/scriptcache.h" | |||||
#include "script/sigcache.h" | #include "script/sigcache.h" | ||||
#include "script/standard.h" | #include "script/standard.h" | ||||
#include "timedata.h" | #include "timedata.h" | ||||
#include "torcontrol.h" | #include "torcontrol.h" | ||||
#include "txdb.h" | #include "txdb.h" | ||||
#include "txmempool.h" | #include "txmempool.h" | ||||
#include "ui_interface.h" | #include "ui_interface.h" | ||||
#include "util.h" | #include "util.h" | ||||
▲ Show 20 Lines • Show All 662 Lines • ▼ Show 20 Lines | if (showDebug) { | ||||
strprintf("Require high priority for relaying free " | strprintf("Require high priority for relaying free " | ||||
"or low-fee transactions (default: %u)", | "or low-fee transactions (default: %u)", | ||||
DEFAULT_RELAYPRIORITY)); | DEFAULT_RELAYPRIORITY)); | ||||
strUsage += HelpMessageOpt( | strUsage += HelpMessageOpt( | ||||
"-maxsigcachesize=<n>", | "-maxsigcachesize=<n>", | ||||
strprintf("Limit size of signature cache to <n> MiB (default: %u)", | strprintf("Limit size of signature cache to <n> MiB (default: %u)", | ||||
DEFAULT_MAX_SIG_CACHE_SIZE)); | DEFAULT_MAX_SIG_CACHE_SIZE)); | ||||
strUsage += HelpMessageOpt( | strUsage += HelpMessageOpt( | ||||
"-maxscriptcachesize=<n>", | |||||
strprintf("Limit size of script cache to <n> MiB (default: %u)", | |||||
DEFAULT_MAX_SCRIPT_CACHE_SIZE)); | |||||
strUsage += HelpMessageOpt( | |||||
"-maxtipage=<n>", | "-maxtipage=<n>", | ||||
strprintf("Maximum tip age in seconds to consider node in initial " | strprintf("Maximum tip age in seconds to consider node in initial " | ||||
"block download (default: %u)", | "block download (default: %u)", | ||||
DEFAULT_MAX_TIP_AGE)); | DEFAULT_MAX_TIP_AGE)); | ||||
} | } | ||||
strUsage += HelpMessageOpt( | strUsage += HelpMessageOpt( | ||||
"-minrelaytxfee=<amt>", | "-minrelaytxfee=<amt>", | ||||
strprintf( | strprintf( | ||||
▲ Show 20 Lines • Show All 934 Lines • ▼ Show 20 Lines | #endif | ||||
LogPrintf("Using data directory %s\n", GetDataDir().string()); | LogPrintf("Using data directory %s\n", GetDataDir().string()); | ||||
LogPrintf("Using config file %s\n", | LogPrintf("Using config file %s\n", | ||||
GetConfigFile(GetArg("-conf", BITCOIN_CONF_FILENAME)).string()); | GetConfigFile(GetArg("-conf", BITCOIN_CONF_FILENAME)).string()); | ||||
LogPrintf("Using at most %i automatic connections (%i file descriptors " | LogPrintf("Using at most %i automatic connections (%i file descriptors " | ||||
"available)\n", | "available)\n", | ||||
nMaxConnections, nFD); | nMaxConnections, nFD); | ||||
InitSignatureCache(); | InitSignatureCache(); | ||||
InitScriptExecutionCache(); | |||||
LogPrintf("Using %u threads for script verification\n", | LogPrintf("Using %u threads for script verification\n", | ||||
nScriptCheckThreads); | nScriptCheckThreads); | ||||
if (nScriptCheckThreads) { | if (nScriptCheckThreads) { | ||||
for (int i = 0; i < nScriptCheckThreads - 1; i++) | for (int i = 0; i < nScriptCheckThreads - 1; i++) { | ||||
threadGroup.create_thread(&ThreadScriptCheck); | threadGroup.create_thread(&ThreadScriptCheck); | ||||
} | } | ||||
} | |||||
// Start the lightweight task scheduler thread | // Start the lightweight task scheduler thread | ||||
CScheduler::Function serviceLoop = | CScheduler::Function serviceLoop = | ||||
boost::bind(&CScheduler::serviceQueue, &scheduler); | boost::bind(&CScheduler::serviceQueue, &scheduler); | ||||
threadGroup.create_thread(boost::bind(&TraceThread<CScheduler::Function>, | threadGroup.create_thread(boost::bind(&TraceThread<CScheduler::Function>, | ||||
"scheduler", serviceLoop)); | "scheduler", serviceLoop)); | ||||
/* Start the RPC server already. It will be started in "warmup" mode | /* Start the RPC server already. It will be started in "warmup" mode | ||||
▲ Show 20 Lines • Show All 505 Lines • Show Last 20 Lines |