aboutsummaryrefslogtreecommitdiff
path: root/src/wallet.cpp
diff options
context:
space:
mode:
authorLuke Dashjr <luke-jr+git@utopios.org>2012-05-27 23:06:09 +0000
committerLuke Dashjr <luke-jr+git@utopios.org>2012-08-23 18:18:20 +0000
commit9c7722b7c5ce49130bd978b932f73b629ce5cebe (patch)
treed1020863fbc36871042171d73433f0f055f27f3f /src/wallet.cpp
parentcf78183fadac6e9fccb51c7355cfa34641fc06d5 (diff)
downloadbitcoin-9c7722b7c5ce49130bd978b932f73b629ce5cebe.tar.xz
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.
Diffstat (limited to 'src/wallet.cpp')
-rw-r--r--src/wallet.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/wallet.cpp b/src/wallet.cpp
index 821b8851a6..3d380c827f 100644
--- a/src/wallet.cpp
+++ b/src/wallet.cpp
@@ -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)