aboutsummaryrefslogtreecommitdiff
path: root/src/wallet
diff options
context:
space:
mode:
authorPatrick Strateman <patrick.strateman@gmail.com>2016-09-09 18:53:23 -0700
committerPatrick Strateman <patrick.strateman@gmail.com>2016-09-15 06:52:15 -0700
commit59adc86680911a83dcccf5b23db299a370fc92f2 (patch)
tree44f3a18b2e07624ed5b4f5769ed10945d1dca7b8 /src/wallet
parenta82e5d8220bbc8b5d786bed99b0876f530b9b7cc (diff)
Add CWallet::ListAccountCreditDebit
Simple pass through for CWalletDB::ListAccountCreditDebit
Diffstat (limited to 'src/wallet')
-rw-r--r--src/wallet/test/accounting_tests.cpp2
-rw-r--r--src/wallet/wallet.cpp5
-rw-r--r--src/wallet/wallet.h1
3 files changed, 7 insertions, 1 deletions
diff --git a/src/wallet/test/accounting_tests.cpp b/src/wallet/test/accounting_tests.cpp
index a6cada46a2..1863652fd7 100644
--- a/src/wallet/test/accounting_tests.cpp
+++ b/src/wallet/test/accounting_tests.cpp
@@ -23,7 +23,7 @@ GetResults(CWalletDB& walletdb, std::map<CAmount, CAccountingEntry>& results)
results.clear();
BOOST_CHECK(walletdb.ReorderTransactions(pwalletMain) == DB_LOAD_OK);
- walletdb.ListAccountCreditDebit("", aes);
+ pwalletMain->ListAccountCreditDebit("", aes);
BOOST_FOREACH(CAccountingEntry& ae, aes)
{
results[ae.nOrderPos] = ae;
diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp
index 4c10ea0edb..7b55111673 100644
--- a/src/wallet/wallet.cpp
+++ b/src/wallet/wallet.cpp
@@ -2501,6 +2501,11 @@ bool CWallet::CommitTransaction(CWalletTx& wtxNew, CReserveKey& reservekey, CCon
return true;
}
+void CWallet::ListAccountCreditDebit(const std::string& strAccount, std::list<CAccountingEntry>& entries) {
+ CWalletDB walletdb(strWalletFile);
+ return walletdb.ListAccountCreditDebit(strAccount, entries);
+}
+
bool CWallet::AddAccountingEntry(const CAccountingEntry& acentry, CWalletDB & pwalletdb)
{
if (!pwalletdb.WriteAccountingEntry_Backend(acentry))
diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h
index 61aff6e45a..160e097a8e 100644
--- a/src/wallet/wallet.h
+++ b/src/wallet/wallet.h
@@ -775,6 +775,7 @@ public:
std::string& strFailReason, const CCoinControl *coinControl = NULL, bool sign = true);
bool CommitTransaction(CWalletTx& wtxNew, CReserveKey& reservekey, CConnman* connman);
+ void ListAccountCreditDebit(const std::string& strAccount, std::list<CAccountingEntry>& entries);
bool AddAccountingEntry(const CAccountingEntry&, CWalletDB & pwalletdb);
static CFeeRate minTxFee;