MCPcopy Create free account
hub / github.com/bitcoinxt/bitcoinxt / ScriptCheckThreads

Method ScriptCheckThreads

src/options.cpp:56–66  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

54}
55
56int Opt::ScriptCheckThreads() {
57 // -par=0 means autodetect, but nScriptCheckThreads==0 means no concurrency
58 int nScriptCheckThreads = Args->GetArg("-par", DEFAULT_SCRIPTCHECK_THREADS);
59 if (nScriptCheckThreads <= 0)
60 nScriptCheckThreads += GetNumCores();
61 if (nScriptCheckThreads <= 1)
62 nScriptCheckThreads = 0;
63 else if (nScriptCheckThreads > MAX_SCRIPTCHECK_THREADS)
64 nScriptCheckThreads = MAX_SCRIPTCHECK_THREADS;
65 return nScriptCheckThreads;
66}
67
68int64_t Opt::CheckpointDays() {
69 int64_t def = DEFAULT_CHECKPOINT_DAYS * std::max(1, ScriptCheckThreads());

Callers 4

AppInit2Function · 0.80
ConnectBlockFunction · 0.80
TestingSetupMethod · 0.80
BOOST_AUTO_TEST_CASEFunction · 0.80

Calls 2

GetNumCoresFunction · 0.85
GetArgMethod · 0.45

Tested by 2

TestingSetupMethod · 0.64
BOOST_AUTO_TEST_CASEFunction · 0.64