diff options
author | Philip Kaufmann <phil.kaufmann@t-online.de> | 2014-02-18 12:48:16 +0100 |
---|---|---|
committer | Philip Kaufmann <phil.kaufmann@t-online.de> | 2014-03-27 11:54:13 +0100 |
commit | 5409404d7585d45b5d4a7142171f138c213e6e19 (patch) | |
tree | e04848a16e77aee270cd7bd5fe1c12f825860aac /src/init.cpp | |
parent | 77eaa6fc45ba7cda90ca7c1ed2374e488a553d2e (diff) |
add constant for shared (GUI/core) -par settings
- introduce DEFAULT_SCRIPTCHECK_THREADS in main.h
- only show values from -"MAX_HW_THREADS" up to 16 for -par, as it
makes no sense to try to leave more "cores free" than the system
supports anyway
- use the new constant in optionsdialog and remove defaults from
.ui file
Diffstat (limited to 'src/init.cpp')
-rw-r--r-- | src/init.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/init.cpp b/src/init.cpp index 1c6411706b..cd06e0c204 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -205,7 +205,7 @@ std::string HelpMessage(HelpMessageMode hmm) strUsage += " -dbcache=<n> " + strprintf(_("Set database cache size in megabytes (%d to %d, default: %d)"), nMinDbCache, nMaxDbCache, nDefaultDbCache) + "\n"; strUsage += " -keypool=<n> " + _("Set key pool size to <n> (default: 100)") + "\n"; strUsage += " -loadblock=<file> " + _("Imports blocks from external blk000??.dat file") + " " + _("on startup") + "\n"; - strUsage += " -par=<n> " + _("Set the number of script verification threads (up to 16, 0 = auto, <0 = leave that many cores free, default: 0)") + "\n"; + strUsage += " -par=<n> " + strprintf(_("Set the number of script verification threads (%u to %d, 0 = auto, <0 = leave that many cores free, default: %d)"), -(int)boost::thread::hardware_concurrency(), MAX_SCRIPTCHECK_THREADS, DEFAULT_SCRIPTCHECK_THREADS) + "\n"; strUsage += " -pid=<file> " + _("Specify pid file (default: bitcoind.pid)") + "\n"; strUsage += " -reindex " + _("Rebuild block chain index from current blk000??.dat files") + " " + _("on startup") + "\n"; strUsage += " -txindex " + _("Maintain a full transaction index (default: 0)") + "\n"; @@ -519,7 +519,7 @@ bool AppInit2(boost::thread_group& threadGroup) Checkpoints::fEnabled = GetBoolArg("-checkpoints", true); // -par=0 means autodetect, but nScriptCheckThreads==0 means no concurrency - nScriptCheckThreads = GetArg("-par", 0); + nScriptCheckThreads = GetArg("-par", DEFAULT_SCRIPTCHECK_THREADS); if (nScriptCheckThreads <= 0) nScriptCheckThreads += boost::thread::hardware_concurrency(); if (nScriptCheckThreads <= 1) |