diff options
author | Cozz Lovan <cozzlovan@yahoo.com> | 2014-02-07 12:59:46 +0100 |
---|---|---|
committer | Cozz Lovan <cozzlovan@yahoo.com> | 2014-02-07 12:59:46 +0100 |
commit | cdb6c169355488d4e64a2435d916cb67a9c01ebe (patch) | |
tree | d6c9dae1cde5c582f1a609be191580ac7685cc3b | |
parent | 44eb59e4a65499b581f3dd65adb719b21dc73673 (diff) |
remove setting methods in wallet/walletdb
-rw-r--r-- | src/wallet.cpp | 19 | ||||
-rw-r--r-- | src/walletdb.cpp | 6 | ||||
-rw-r--r-- | src/walletdb.h | 16 |
3 files changed, 0 insertions, 41 deletions
diff --git a/src/wallet.cpp b/src/wallet.cpp index 9648f6f88d..979560651c 100644 --- a/src/wallet.cpp +++ b/src/wallet.cpp @@ -191,18 +191,6 @@ void CWallet::SetBestChain(const CBlockLocator& loc) walletdb.WriteBestBlock(loc); } -// This class implements an addrIncoming entry that causes pre-0.4 -// clients to crash on startup if reading a private-key-encrypted wallet. -class CCorruptAddress -{ -public: - IMPLEMENT_SERIALIZE - ( - if (nType & SER_DISK) - READWRITE(nVersion); - ) -}; - bool CWallet::SetMinVersion(enum WalletFeature nVersion, CWalletDB* pwalletdbIn, bool fExplicit) { AssertLockHeld(cs_wallet); // nWalletVersion @@ -221,13 +209,6 @@ bool CWallet::SetMinVersion(enum WalletFeature nVersion, CWalletDB* pwalletdbIn, if (fFileBacked) { CWalletDB* pwalletdb = pwalletdbIn ? pwalletdbIn : new CWalletDB(strWalletFile); - if (nWalletVersion >= 40000) - { - // Versions prior to 0.4.0 did not support the "minversion" record. - // Use a CCorruptAddress to make them crash instead. - CCorruptAddress corruptAddress; - pwalletdb->WriteSetting("addrIncoming", corruptAddress); - } if (nWalletVersion > 40000) pwalletdb->WriteMinVersion(nWalletVersion); if (!pwalletdbIn) diff --git a/src/walletdb.cpp b/src/walletdb.cpp index d912317a55..56349fcfbd 100644 --- a/src/walletdb.cpp +++ b/src/walletdb.cpp @@ -154,12 +154,6 @@ bool CWalletDB::ErasePool(int64_t nPool) return Erase(std::make_pair(std::string("pool"), nPool)); } -bool CWalletDB::EraseSetting(const std::string& strKey) -{ - nWalletDBUpdated++; - return Erase(std::make_pair(std::string("setting"), strKey)); -} - bool CWalletDB::WriteMinVersion(int nVersion) { return Write(std::string("minversion"), nVersion); diff --git a/src/walletdb.h b/src/walletdb.h index 15af287245..4f3e29283e 100644 --- a/src/walletdb.h +++ b/src/walletdb.h @@ -104,22 +104,6 @@ public: bool WritePool(int64_t nPool, const CKeyPool& keypool); bool ErasePool(int64_t 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); - bool WriteMinVersion(int nVersion); bool ReadAccount(const std::string& strAccount, CAccount& account); |