mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-19 23:03:45 +01:00
remove setting methods in wallet/walletdb
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user