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
This commit is contained in:
Philip Kaufmann
2014-02-18 12:48:16 +01:00
parent 77eaa6fc45
commit 5409404d75
5 changed files with 19 additions and 20 deletions

View File

@@ -14,7 +14,7 @@
#include "monitoreddatamapper.h"
#include "optionsmodel.h"
#include "main.h" // for CTransaction::nMinTxFee
#include "main.h" // for CTransaction::nMinTxFee and MAX_SCRIPTCHECK_THREADS
#include "netbase.h"
#include "txdb.h" // for -dbcache defaults
@@ -37,6 +37,8 @@ OptionsDialog::OptionsDialog(QWidget *parent) :
/* Main elements init */
ui->databaseCache->setMinimum(nMinDbCache);
ui->databaseCache->setMaximum(nMaxDbCache);
ui->threadsScriptVerif->setMinimum(-(int)boost::thread::hardware_concurrency());
ui->threadsScriptVerif->setMaximum(MAX_SCRIPTCHECK_THREADS);
/* Network elements init */
#ifndef USE_UPNP