diff options
author | Gavin Andresen <gavinandresen@gmail.com> | 2012-09-18 10:59:31 -0400 |
---|---|---|
committer | Gavin Andresen <gavinandresen@gmail.com> | 2012-09-18 10:59:31 -0400 |
commit | a0971337d0ce2451e576d51643e869d0cb931292 (patch) | |
tree | c45e4c577b7f3847c27a7c7314e481bca93b50de /src/wallet.cpp | |
parent | 5add0b0d0ff56774ca4716240a615175d79e82ec (diff) | |
parent | da7b8c1260d91e3306eb18dd65633567cb31332f (diff) |
Merge branch 'refactor_times' of git://github.com/luke-jr/bitcoin
Diffstat (limited to 'src/wallet.cpp')
-rw-r--r-- | src/wallet.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/wallet.cpp b/src/wallet.cpp index f88a0e1413..880f7aa8bd 100644 --- a/src/wallet.cpp +++ b/src/wallet.cpp @@ -291,6 +291,13 @@ bool CWallet::EncryptWallet(const SecureString& strWalletPassphrase) return true; } +int64 CWallet::IncOrderPosNext() +{ + int64 nRet = nOrderPosNext; + CWalletDB(strWalletFile).WriteOrderPosNext(++nOrderPosNext); + return nRet; +} + CWallet::TxItems CWallet::OrderedTxItems(std::list<CAccountingEntry>& acentries, std::string strAccount) { CWalletDB walletdb(strWalletFile); @@ -362,7 +369,7 @@ bool CWallet::AddToWallet(const CWalletTx& wtxIn) if (fInsertedNew) { wtx.nTimeReceived = GetAdjustedTime(); - wtx.nOrderPos = nOrderPosNext++; + wtx.nOrderPos = IncOrderPosNext(); wtx.nTimeSmart = wtx.nTimeReceived; if (wtxIn.hashBlock != 0) |