- 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
add constant for shared (GUI/core) -par settings #3698
pull Diapolo wants to merge 1 commits into bitcoin:master from Diapolo:par changing 5 files +19 −20-
Diapolo commented at 12:15 PM on February 18, 2014: none
-
in src/main.h:None in 95b73c1b45 outdated
58 | @@ -59,6 +59,11 @@ 59 | static const unsigned int LOCKTIME_THRESHOLD = 500000000; // Tue Nov 5 00:53:20 1985 UTC 60 | /** Maximum number of script-checking threads allowed */ 61 | static const int MAX_SCRIPTCHECK_THREADS = 16; 62 | +/** -par default (number of script-checking threads, 0 = auto) */ 63 | +static const int DEFAULT_SCRIPTCHECK_THREADS = 0; 64 | +/** Maximum number of hardware threads the system supports */ 65 | +static const int MAX_HW_THREADS = boost::thread::hardware_concurrency();
laanwj commented at 11:40 AM on February 19, 2014:I prefer not defining this and just using boost::thread::hardware_concurrency() where appropriate. No magic number is hardcoded here, we're just replacing the boost name with a name our own. Also this is not a constant, and not a maximum (you can use more threads than this, it likely won't help you much, but you can).
Diapolo commented at 1:42 PM on February 19, 2014:I changed it back, also the number of HW threads is just used to limit the negative number you can input to "leave cores free".
in src/qt/optionsdialog.cpp:None in 960d431614 outdated
36 | @@ -37,6 +37,8 @@ 37 | /* Main elements init */ 38 | ui->databaseCache->setMinimum(nMinDbCache); 39 | ui->databaseCache->setMaximum(nMaxDbCache); 40 | + ui->threadsScriptVerif->setMinimum(-(int)boost::thread::hardware_concurrency()); 41 | + ui->threadsScriptVerif->setMaximum(MAX_SCRIPTCHECK_THREADS);
laanwj commented at 1:48 PM on February 19, 2014:I don't think having 0 as maximum is useful :) Probably best to set no maximum, if we want to manually control the number of verification threads, there is no upper limit.never mind, misreadlaanwj commented at 1:48 PM on February 19, 2014: memberACK
laanwj commented at 1:50 PM on February 19, 2014: memberPlease use DEFAULT_SCRIPTCHECK_THREADS in the optionsmodel as well: https://github.com/bitcoin/bitcoin/blob/master/src/qt/optionsmodel.cpp#L93
5409404d75add 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
Diapolo commented at 10:55 AM on March 27, 2014: noneRebased...
BitcoinPullTester commented at 11:26 AM on March 27, 2014: noneAutomatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/5409404d7585d45b5d4a7142171f138c213e6e19 for binaries and test log. This test script verifies pulls every time they are updated. It, however, dies sometimes and fails to test properly. If you are waiting on a test, please check timestamps to verify that the test.log is moving at http://jenkins.bluematt.me/pull-tester/current/ Contact BlueMatt on freenode if something looks broken.
laanwj referenced this in commit e33cc87212 on Mar 27, 2014laanwj merged this on Mar 27, 2014laanwj closed this on Mar 27, 2014Diapolo deleted the branch on Apr 1, 2014DrahtBot locked this on Sep 8, 2021Contributors
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-15 03:15 UTC
More mirrored repositories can be found on mirror.b10c.me