From 10ef7d75f52bad45305cf1e8a8f693989781c28f Mon Sep 17 00:00:00 2001 From: janko33bd Date: Fri, 5 Jan 2018 21:58:03 +0100 Subject: [PATCH] Revert "[Qt] Add dbcache migration path" This reverts commit 921b8483da618173c5b0295172804fefe16a9d9d. --- src/qt/optionsmodel.cpp | 21 --------------------- src/qt/optionsmodel.h | 4 +--- 2 files changed, 1 insertion(+), 24 deletions(-) diff --git a/src/qt/optionsmodel.cpp b/src/qt/optionsmodel.cpp index 5538a2841..d71e22809 100644 --- a/src/qt/optionsmodel.cpp +++ b/src/qt/optionsmodel.cpp @@ -44,8 +44,6 @@ void OptionsModel::Init(bool resetSettings) if (resetSettings) Reset(); - checkAndMigrate(); - QSettings settings; // Ensure restart flag is unset on client startup @@ -445,22 +443,3 @@ bool OptionsModel::isRestartRequired() QSettings settings; return settings.value("fRestartRequired", false).toBool(); } - -void OptionsModel::checkAndMigrate() -{ - // Migration of default values - // Check if the QSettings container was already loaded with this client version - QSettings settings; - static const char strSettingsVersionKey[] = "nSettingsVersion"; - int settingsVersion = settings.contains(strSettingsVersionKey) ? settings.value(strSettingsVersionKey).toInt() : 0; - if (settingsVersion < CLIENT_VERSION) - { - // -dbcache was bumped from 100 to 300 in 0.13 - // see https://github.com/bitcoin/bitcoin/pull/8273 - // force people to upgrade to the new value if they are using 100MB - if (settingsVersion < 130000 && settings.contains("nDatabaseCache") && settings.value("nDatabaseCache").toLongLong() == 100) - settings.setValue("nDatabaseCache", (qint64)nDefaultDbCache); - - settings.setValue(strSettingsVersionKey, CLIENT_VERSION); - } -} \ No newline at end of file diff --git a/src/qt/optionsmodel.h b/src/qt/optionsmodel.h index b23b5f260..3b491ceac 100644 --- a/src/qt/optionsmodel.h +++ b/src/qt/optionsmodel.h @@ -84,11 +84,9 @@ private: /* settings that were overriden by command-line */ QString strOverriddenByCommandLine; - // Add option to list of GUI options overridden through command line/config file + /// Add option to list of GUI options overridden through command line/config file void addOverriddenOption(const std::string &option); - // Check settings version and upgrade default values if required - void checkAndMigrate(); Q_SIGNALS: void displayUnitChanged(int unit); void coinControlFeaturesChanged(bool);