Skip to content

Commit

Permalink
Delete unused non-CWalletTx GetCredit
Browse files Browse the repository at this point in the history
  • Loading branch information
instagibbs committed Jun 3, 2019
1 parent 66c0155 commit c17af5d
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 15 deletions.
14 changes: 0 additions & 14 deletions src/wallet/wallet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1459,20 +1459,6 @@ CAmountMap CWallet::GetCredit(const CWalletTx& wtx, const isminefilter& filter)
return nCredit;
}

CAmountMap CWallet::GetCredit(const CTransaction& tx, const isminefilter& filter) const
{
assert(false && "CWallet::GetCredit(const CTransaction&, const isminefilter&): this method should not be used anymore");

CAmountMap nCredit;
for (const CTxOut& txout : tx.vout)
{
nCredit += GetCredit(txout, filter);
if (!MoneyRange(nCredit))
throw std::runtime_error(std::string(__func__) + ": value out of range");
}
return nCredit;
}

CAmountMap CWallet::GetChange(const CWalletTx& wtx) const {
CAmountMap nChange;
for (unsigned int i = 0; i < wtx.tx->vout.size(); ++i) {
Expand Down
1 change: 0 additions & 1 deletion src/wallet/wallet.h
Original file line number Diff line number Diff line change
Expand Up @@ -1159,7 +1159,6 @@ class CWallet final : public CCryptoKeyStore, public CValidationInterface
CAmountMap GetDebit(const CTransaction& tx, const isminefilter& filter) const;
/** Returns whether all of the inputs match the filter */
bool IsAllFromMe(const CTransaction& tx, const isminefilter& filter) const;
CAmountMap GetCredit(const CTransaction& tx, const isminefilter& filter) const;
CAmountMap GetChange(const CTransaction& tx) const;

// ELEMENTS:
Expand Down

0 comments on commit c17af5d

Please sign in to comment.