aboutsummaryrefslogtreecommitdiff
path: root/src/qt
diff options
context:
space:
mode:
Diffstat (limited to 'src/qt')
-rw-r--r--src/qt/forms/optionsdialog.ui8
-rw-r--r--src/qt/optionsdialog.cpp4
-rw-r--r--src/qt/optionsmodel.cpp21
3 files changed, 15 insertions, 18 deletions
diff --git a/src/qt/forms/optionsdialog.ui b/src/qt/forms/optionsdialog.ui
index 36b070f1c8..9fbc865185 100644
--- a/src/qt/forms/optionsdialog.ui
+++ b/src/qt/forms/optionsdialog.ui
@@ -98,13 +98,7 @@
<item>
<widget class="QSpinBox" name="threadsScriptVerif">
<property name="toolTip">
- <string>Set the number of script verification threads (up to 16, 0 = auto, &lt;0 = leave that many cores free, default: 0)</string>
- </property>
- <property name="minimum">
- <number>-16</number>
- </property>
- <property name="maximum">
- <number>16</number>
+ <string>(0 = auto, &lt;0 = leave that many cores free)</string>
</property>
</widget>
</item>
diff --git a/src/qt/optionsdialog.cpp b/src/qt/optionsdialog.cpp
index 9f7c484946..977f7f4da7 100644
--- a/src/qt/optionsdialog.cpp
+++ b/src/qt/optionsdialog.cpp
@@ -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
diff --git a/src/qt/optionsmodel.cpp b/src/qt/optionsmodel.cpp
index b61fdd2301..9abe9351bb 100644
--- a/src/qt/optionsmodel.cpp
+++ b/src/qt/optionsmodel.cpp
@@ -76,6 +76,17 @@ void OptionsModel::Init()
// by command-line and show this in the UI.
// Main
+ if (!settings.contains("nDatabaseCache"))
+ settings.setValue("nDatabaseCache", (qint64)nDefaultDbCache);
+ if (!SoftSetArg("-dbcache", settings.value("nDatabaseCache").toString().toStdString()))
+ addOverriddenOption("-dbcache");
+
+ if (!settings.contains("nThreadsScriptVerif"))
+ settings.setValue("nThreadsScriptVerif", DEFAULT_SCRIPTCHECK_THREADS);
+ if (!SoftSetArg("-par", settings.value("nThreadsScriptVerif").toString().toStdString()))
+ addOverriddenOption("-par");
+
+ // Wallet
#ifdef ENABLE_WALLET
if (!settings.contains("nTransactionFee"))
settings.setValue("nTransactionFee", 0);
@@ -89,16 +100,6 @@ void OptionsModel::Init()
addOverriddenOption("-spendzeroconfchange");
#endif
- if (!settings.contains("nDatabaseCache"))
- settings.setValue("nDatabaseCache", (qint64)nDefaultDbCache);
- if (!SoftSetArg("-dbcache", settings.value("nDatabaseCache").toString().toStdString()))
- addOverriddenOption("-dbcache");
-
- if (!settings.contains("nThreadsScriptVerif"))
- settings.setValue("nThreadsScriptVerif", 0);
- if (!SoftSetArg("-par", settings.value("nThreadsScriptVerif").toString().toStdString()))
- addOverriddenOption("-par");
-
// Network
if (!settings.contains("fUseUPnP"))
#ifdef USE_UPNP