Skip to content

Commit 59adc86

Browse files
committed
Add CWallet::ListAccountCreditDebit
Simple pass through for CWalletDB::ListAccountCreditDebit
1 parent a82e5d8 commit 59adc86

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

src/wallet/test/accounting_tests.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ GetResults(CWalletDB& walletdb, std::map<CAmount, CAccountingEntry>& results)
2323

2424
results.clear();
2525
BOOST_CHECK(walletdb.ReorderTransactions(pwalletMain) == DB_LOAD_OK);
26-
walletdb.ListAccountCreditDebit("", aes);
26+
pwalletMain->ListAccountCreditDebit("", aes);
2727
BOOST_FOREACH(CAccountingEntry& ae, aes)
2828
{
2929
results[ae.nOrderPos] = ae;

src/wallet/wallet.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2501,6 +2501,11 @@ bool CWallet::CommitTransaction(CWalletTx& wtxNew, CReserveKey& reservekey, CCon
25012501
return true;
25022502
}
25032503

2504+
void CWallet::ListAccountCreditDebit(const std::string& strAccount, std::list<CAccountingEntry>& entries) {
2505+
CWalletDB walletdb(strWalletFile);
2506+
return walletdb.ListAccountCreditDebit(strAccount, entries);
2507+
}
2508+
25042509
bool CWallet::AddAccountingEntry(const CAccountingEntry& acentry, CWalletDB & pwalletdb)
25052510
{
25062511
if (!pwalletdb.WriteAccountingEntry_Backend(acentry))

src/wallet/wallet.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -775,6 +775,7 @@ class CWallet : public CCryptoKeyStore, public CValidationInterface
775775
std::string& strFailReason, const CCoinControl *coinControl = NULL, bool sign = true);
776776
bool CommitTransaction(CWalletTx& wtxNew, CReserveKey& reservekey, CConnman* connman);
777777

778+
void ListAccountCreditDebit(const std::string& strAccount, std::list<CAccountingEntry>& entries);
778779
bool AddAccountingEntry(const CAccountingEntry&, CWalletDB & pwalletdb);
779780

780781
static CFeeRate minTxFee;

0 commit comments

Comments
 (0)