| 291 | } |
| 292 | |
| 293 | CAmount CWalletDB::GetAccountCreditDebit(const string& strAccount) |
| 294 | { |
| 295 | list<CAccountingEntry> entries; |
| 296 | ListAccountCreditDebit(strAccount, entries); |
| 297 | |
| 298 | CAmount nCreditDebit = 0; |
| 299 | for (const CAccountingEntry& entry : entries) |
| 300 | nCreditDebit += entry.nCreditDebit; |
| 301 | |
| 302 | return nCreditDebit; |
| 303 | } |
| 304 | |
| 305 | void CWalletDB::ListAccountCreditDebit(const string& strAccount, list<CAccountingEntry>& entries) |
| 306 | { |