Store a fixed order of transactions (and accounting) in the wallet

For backward compatibility, new accounting data is stored after a \0 in the comment string.
This way, old versions and third-party software should load and store them, but all actual use (listtransactions, for example) ignores it.
This commit is contained in:
Luke Dashjr
2012-05-27 23:06:09 +00:00
parent cf78183fad
commit 9c7722b7c5
6 changed files with 315 additions and 7 deletions

View File

@@ -336,7 +336,10 @@ bool CWallet::AddToWallet(const CWalletTx& wtxIn)
wtx.BindWallet(this);
bool fInsertedNew = ret.second;
if (fInsertedNew)
{
wtx.nTimeReceived = GetAdjustedTime();
wtx.nOrderPos = nOrderPosNext++;
}
bool fUpdated = false;
if (!fInsertedNew)