Merge pull request #358 from rnicoll/legacy_wallet_upgrade
Removed wallet upgrade code inherited from Bitcoin/Litecoin
This commit is contained in:
commit
cb56493228
|
@ -214,26 +214,6 @@ ReadKeyValue(CWallet* pwallet, CDataStream& ssKey, CDataStream& ssValue,
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Undo serialize changes in 31600
|
|
||||||
if (31404 <= wtx.fTimeReceivedIsTxTime && wtx.fTimeReceivedIsTxTime <= 31703)
|
|
||||||
{
|
|
||||||
if (!ssValue.empty())
|
|
||||||
{
|
|
||||||
char fTmp;
|
|
||||||
char fUnused;
|
|
||||||
ssValue >> fTmp >> fUnused >> wtx.strFromAccount;
|
|
||||||
strErr = strprintf("LoadWallet() upgrading tx ver=%d %d '%s' %s",
|
|
||||||
wtx.fTimeReceivedIsTxTime, fTmp, wtx.strFromAccount.c_str(), hash.ToString().c_str());
|
|
||||||
wtx.fTimeReceivedIsTxTime = fTmp;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
strErr = strprintf("LoadWallet() repairing tx ver=%d %s", wtx.fTimeReceivedIsTxTime, hash.ToString().c_str());
|
|
||||||
wtx.fTimeReceivedIsTxTime = 0;
|
|
||||||
}
|
|
||||||
vWalletUpgrade.push_back(hash);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (wtx.nOrderPos == -1)
|
if (wtx.nOrderPos == -1)
|
||||||
fAnyUnordered = true;
|
fAnyUnordered = true;
|
||||||
|
|
||||||
|
@ -454,10 +434,6 @@ DBErrors CWalletDB::LoadWallet(CWallet* pwallet)
|
||||||
BOOST_FOREACH(uint256 hash, vWalletUpgrade)
|
BOOST_FOREACH(uint256 hash, vWalletUpgrade)
|
||||||
WriteTx(hash, pwallet->mapWallet[hash]);
|
WriteTx(hash, pwallet->mapWallet[hash]);
|
||||||
|
|
||||||
// Rewrite encrypted wallets of versions 0.4.0 and 0.5.0rc:
|
|
||||||
if (fIsEncrypted && (nFileVersion == 40000 || nFileVersion == 50000))
|
|
||||||
return DB_NEED_REWRITE;
|
|
||||||
|
|
||||||
if (nFileVersion < CLIENT_VERSION) // Update
|
if (nFileVersion < CLIENT_VERSION) // Update
|
||||||
WriteVersion(CLIENT_VERSION);
|
WriteVersion(CLIENT_VERSION);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue