|
|
|
@ -291,8 +291,7 @@ bool CWallet::EncryptWallet(const SecureString& strWalletPassphrase)
@@ -291,8 +291,7 @@ bool CWallet::EncryptWallet(const SecureString& strWalletPassphrase)
|
|
|
|
|
return true; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
CWallet::TxItems |
|
|
|
|
CWallet::OrderedTxItems(std::string strAccount) |
|
|
|
|
CWallet::TxItems CWallet::OrderedTxItems(std::list<CAccountingEntry>& acentries, std::string strAccount) |
|
|
|
|
{ |
|
|
|
|
CWalletDB walletdb(strWalletFile); |
|
|
|
|
|
|
|
|
@ -306,7 +305,7 @@ CWallet::OrderedTxItems(std::string strAccount)
@@ -306,7 +305,7 @@ CWallet::OrderedTxItems(std::string strAccount)
|
|
|
|
|
CWalletTx* wtx = &((*it).second); |
|
|
|
|
txOrdered.insert(make_pair(wtx->nOrderPos, TxPair(wtx, (CAccountingEntry*)0))); |
|
|
|
|
} |
|
|
|
|
list<CAccountingEntry> acentries; |
|
|
|
|
acentries.clear(); |
|
|
|
|
walletdb.ListAccountCreditDebit(strAccount, acentries); |
|
|
|
|
BOOST_FOREACH(CAccountingEntry& entry, acentries) |
|
|
|
|
{ |
|
|
|
@ -375,7 +374,8 @@ bool CWallet::AddToWallet(const CWalletTx& wtxIn)
@@ -375,7 +374,8 @@ bool CWallet::AddToWallet(const CWalletTx& wtxIn)
|
|
|
|
|
{ |
|
|
|
|
// Tolerate times up to the last timestamp in the wallet not more than 5 minutes into the future
|
|
|
|
|
int64 latestTolerated = latestNow + 300; |
|
|
|
|
TxItems txOrdered = OrderedTxItems(); |
|
|
|
|
std::list<CAccountingEntry> acentries; |
|
|
|
|
TxItems txOrdered = OrderedTxItems(acentries); |
|
|
|
|
for (TxItems::reverse_iterator it = txOrdered.rbegin(); it != txOrdered.rend(); ++it) |
|
|
|
|
{ |
|
|
|
|
CWalletTx *const pwtx = (*it).second.first; |
|
|
|
|