add constants for shared (GUI/core) -dbcache settings

- adds nDefaultDbCache, nMaxDbCache and nMinDbCache in txdb.h
This commit is contained in:
Philip Kaufmann
2014-02-16 22:00:12 +01:00
parent 879b390758
commit 82e96006ae
5 changed files with 20 additions and 18 deletions

View File

@@ -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", 100);
settings.setValue("nDatabaseCache", nDefaultDbCache);
if (!SoftSetArg("-dbcache", settings.value("nDatabaseCache").toString().toStdString()))
strOverriddenByCommandLine += "-dbcache ";