Skip to content

Commit

Permalink
Remove CWallet::ListAccountCreditDebit() and GetAccountCreditDebit()
Browse files Browse the repository at this point in the history
Summary:
Functions no longer used.

Partial backport of Core [[bitcoin/bitcoin#13825 | PR13825]]
bitcoin/bitcoin@e6fcc5d
bitcoin/bitcoin@7a0d8f4

Depends on D5316

Test Plan:
  ninja check

Reviewers: O1 Bitcoin ABC, #bitcoin_abc, jasonbcox

Reviewed By: O1 Bitcoin ABC, #bitcoin_abc, jasonbcox

Differential Revision: https://reviews.bitcoinabc.org/D5412
  • Loading branch information
Nico Guiton authored and ftrader committed Apr 24, 2020
1 parent 2413f55 commit 44edc0c
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 21 deletions.
6 changes: 0 additions & 6 deletions src/wallet/wallet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3513,12 +3513,6 @@ bool CWallet::CommitTransaction(
return true;
}

void CWallet::ListAccountCreditDebit(const std::string &strAccount,
std::list<CAccountingEntry> &entries) {
WalletBatch batch(*database);
return batch.ListAccountCreditDebit(strAccount, entries);
}

bool CWallet::AddAccountingEntry(const CAccountingEntry &acentry) {
WalletBatch batch(*database);

Expand Down
2 changes: 0 additions & 2 deletions src/wallet/wallet.h
Original file line number Diff line number Diff line change
Expand Up @@ -1212,8 +1212,6 @@ class CWallet final : public CCryptoKeyStore, public CValidationInterface {
std::string fromAccount, CReserveKey &reservekey, CConnman *connman,
CValidationState &state);

void ListAccountCreditDebit(const std::string &strAccount,
std::list<CAccountingEntry> &entries);
bool AddAccountingEntry(const CAccountingEntry &);
bool AddAccountingEntry(const CAccountingEntry &, WalletBatch *batch);
bool DummySignTx(CMutableTransaction &txNew, const std::set<CTxOut> &txouts,
Expand Down
12 changes: 0 additions & 12 deletions src/wallet/walletdb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -190,18 +190,6 @@ bool WalletBatch::WriteAccountingEntry(const uint64_t nAccEntryNum,
acentry);
}

Amount WalletBatch::GetAccountCreditDebit(const std::string &strAccount) {
std::list<CAccountingEntry> entries;
ListAccountCreditDebit(strAccount, entries);

Amount nCreditDebit = Amount::zero();
for (const CAccountingEntry &entry : entries) {
nCreditDebit += entry.nCreditDebit;
}

return nCreditDebit;
}

void WalletBatch::ListAccountCreditDebit(const std::string &strAccount,
std::list<CAccountingEntry> &entries) {
bool fAllAccounts = (strAccount == "*");
Expand Down
1 change: 0 additions & 1 deletion src/wallet/walletdb.h
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,6 @@ class WalletBatch {
/// Erase destination data tuple from wallet database.
bool EraseDestData(const CTxDestination &address, const std::string &key);

Amount GetAccountCreditDebit(const std::string &strAccount);
void ListAccountCreditDebit(const std::string &strAccount,
std::list<CAccountingEntry> &acentries);

Expand Down

0 comments on commit 44edc0c

Please sign in to comment.