bitcoind changes to stop storing settings in wallet.dat.
[novacoin.git] / src / db.h
index 27479fe..74cb5d8 100644 (file)
--- a/src/db.h
+++ b/src/db.h
@@ -473,18 +473,29 @@ public:
         return Erase(std::make_pair(std::string("pool"), nPool));
     }
 
+    // Settings are no longer stored in wallet.dat; these are
+    // used only for backwards compatibility:
     template<typename T>
     bool ReadSetting(const std::string& strKey, T& value)
     {
         return Read(std::make_pair(std::string("setting"), strKey), value);
     }
-
     template<typename T>
     bool WriteSetting(const std::string& strKey, const T& value)
     {
         nWalletDBUpdated++;
         return Write(std::make_pair(std::string("setting"), strKey), value);
     }
+    bool EraseSetting(const std::string& strKey)
+    {
+        nWalletDBUpdated++;
+        return Erase(std::make_pair(std::string("setting"), strKey));
+    }
+
+    bool WriteMinVersion(int nVersion)
+    {
+        return Write(std::string("minversion"), nVersion);
+    }
 
     bool ReadAccount(const std::string& strAccount, CAccount& account);
     bool WriteAccount(const std::string& strAccount, const CAccount& account);