Skip to content

Commit cdb6c16

Browse files
committed
remove setting methods in wallet/walletdb
1 parent 44eb59e commit cdb6c16

File tree

3 files changed

+0
-41
lines changed

3 files changed

+0
-41
lines changed

src/wallet.cpp

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -191,18 +191,6 @@ void CWallet::SetBestChain(const CBlockLocator& loc)
191191
walletdb.WriteBestBlock(loc);
192192
}
193193

194-
// This class implements an addrIncoming entry that causes pre-0.4
195-
// clients to crash on startup if reading a private-key-encrypted wallet.
196-
class CCorruptAddress
197-
{
198-
public:
199-
IMPLEMENT_SERIALIZE
200-
(
201-
if (nType & SER_DISK)
202-
READWRITE(nVersion);
203-
)
204-
};
205-
206194
bool CWallet::SetMinVersion(enum WalletFeature nVersion, CWalletDB* pwalletdbIn, bool fExplicit)
207195
{
208196
AssertLockHeld(cs_wallet); // nWalletVersion
@@ -221,13 +209,6 @@ bool CWallet::SetMinVersion(enum WalletFeature nVersion, CWalletDB* pwalletdbIn,
221209
if (fFileBacked)
222210
{
223211
CWalletDB* pwalletdb = pwalletdbIn ? pwalletdbIn : new CWalletDB(strWalletFile);
224-
if (nWalletVersion >= 40000)
225-
{
226-
// Versions prior to 0.4.0 did not support the "minversion" record.
227-
// Use a CCorruptAddress to make them crash instead.
228-
CCorruptAddress corruptAddress;
229-
pwalletdb->WriteSetting("addrIncoming", corruptAddress);
230-
}
231212
if (nWalletVersion > 40000)
232213
pwalletdb->WriteMinVersion(nWalletVersion);
233214
if (!pwalletdbIn)

src/walletdb.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -154,12 +154,6 @@ bool CWalletDB::ErasePool(int64_t nPool)
154154
return Erase(std::make_pair(std::string("pool"), nPool));
155155
}
156156

157-
bool CWalletDB::EraseSetting(const std::string& strKey)
158-
{
159-
nWalletDBUpdated++;
160-
return Erase(std::make_pair(std::string("setting"), strKey));
161-
}
162-
163157
bool CWalletDB::WriteMinVersion(int nVersion)
164158
{
165159
return Write(std::string("minversion"), nVersion);

src/walletdb.h

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -104,22 +104,6 @@ class CWalletDB : public CDB
104104
bool WritePool(int64_t nPool, const CKeyPool& keypool);
105105
bool ErasePool(int64_t nPool);
106106

107-
// Settings are no longer stored in wallet.dat; these are
108-
// used only for backwards compatibility:
109-
template<typename T>
110-
bool ReadSetting(const std::string& strKey, T& value)
111-
{
112-
return Read(std::make_pair(std::string("setting"), strKey), value);
113-
}
114-
template<typename T>
115-
bool WriteSetting(const std::string& strKey, const T& value)
116-
{
117-
nWalletDBUpdated++;
118-
return Write(std::make_pair(std::string("setting"), strKey), value);
119-
}
120-
121-
bool EraseSetting(const std::string& strKey);
122-
123107
bool WriteMinVersion(int nVersion);
124108

125109
bool ReadAccount(const std::string& strAccount, CAccount& account);

0 commit comments

Comments
 (0)