aboutsummaryrefslogtreecommitdiff
path: root/src/qt
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2014-02-18 08:35:19 +0100
committerWladimir J. van der Laan <laanwj@gmail.com>2014-02-18 08:35:45 +0100
commitbd8e3751d7cec48428283d29682db7b80474f2ca (patch)
tree7d90efc9dc0241fadb3d0946f4d0786c29584c76 /src/qt
parent0a0cf1433769e495839c5695f388b277b9ff2dfa (diff)
parent82e96006ae03a7debebb9ad36f939ddabb0d2f9f (diff)
downloadbitcoin-bd8e3751d7cec48428283d29682db7b80474f2ca.tar.xz
Merge pull request #3687
82e9600 add constants for shared (GUI/core) -dbcache settings (Philip Kaufmann) 879b390 Increase default dbcache to 100 MiB (Pieter Wuille)
Diffstat (limited to 'src/qt')
-rw-r--r--src/qt/forms/optionsdialog.ui12
-rw-r--r--src/qt/optionsdialog.cpp6
-rw-r--r--src/qt/optionsmodel.cpp3
3 files changed, 7 insertions, 14 deletions
diff --git a/src/qt/forms/optionsdialog.ui b/src/qt/forms/optionsdialog.ui
index b4a9f1f580..a0626f989c 100644
--- a/src/qt/forms/optionsdialog.ui
+++ b/src/qt/forms/optionsdialog.ui
@@ -53,17 +53,7 @@
</widget>
</item>
<item>
- <widget class="QSpinBox" name="databaseCache">
- <property name="toolTip">
- <string>Set database cache size in megabytes (default: 25)</string>
- </property>
- <property name="maximum">
- <number>1024</number>
- </property>
- <property name="value">
- <number>25</number>
- </property>
- </widget>
+ <widget class="QSpinBox" name="databaseCache"/>
</item>
<item>
<widget class="QLabel" name="databaseCacheUnitLabel">
diff --git a/src/qt/optionsdialog.cpp b/src/qt/optionsdialog.cpp
index f4eb7ef07e..e31542961c 100644
--- a/src/qt/optionsdialog.cpp
+++ b/src/qt/optionsdialog.cpp
@@ -14,8 +14,9 @@
#include "monitoreddatamapper.h"
#include "optionsmodel.h"
+#include "main.h" // for CTransaction::nMinTxFee
#include "netbase.h"
-#include "main.h"
+#include "txdb.h" // for -dbcache defaults
#include <QDir>
#include <QIntValidator>
@@ -34,7 +35,8 @@ OptionsDialog::OptionsDialog(QWidget *parent) :
GUIUtil::restoreWindowGeometry("nOptionsDialogWindow", this->size(), this);
/* Main elements init */
- ui->databaseCache->setMaximum(sizeof(void*) > 4 ? 4096 : 1024);
+ ui->databaseCache->setMinimum(nMinDbCache);
+ ui->databaseCache->setMaximum(nMaxDbCache);
/* Network elements init */
#ifndef USE_UPNP
diff --git a/src/qt/optionsmodel.cpp b/src/qt/optionsmodel.cpp
index eff73b7702..1a460b9278 100644
--- a/src/qt/optionsmodel.cpp
+++ b/src/qt/optionsmodel.cpp
@@ -14,6 +14,7 @@
#include "init.h"
#include "main.h"
#include "net.h"
+#include "txdb.h" // for -dbcache defaults
#ifdef ENABLE_WALLET
#include "wallet.h"
#include "walletdb.h"
@@ -84,7 +85,7 @@ void OptionsModel::Init()
#endif
if (!settings.contains("nDatabaseCache"))
- settings.setValue("nDatabaseCache", 25);
+ settings.setValue("nDatabaseCache", nDefaultDbCache);
if (!SoftSetArg("-dbcache", settings.value("nDatabaseCache").toString().toStdString()))
strOverriddenByCommandLine += "-dbcache ";