Skip to content

Commit 0746330

Browse files
instagibbsstevenroose
authored andcommitted
Delete unused non-CWalletTx GetCredit
1 parent 427903d commit 0746330

File tree

2 files changed

+0
-15
lines changed

2 files changed

+0
-15
lines changed

src/wallet/wallet.cpp

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1371,20 +1371,6 @@ CAmountMap CWallet::GetCredit(const CWalletTx& wtx, const isminefilter& filter)
13711371
return nCredit;
13721372
}
13731373

1374-
CAmountMap CWallet::GetCredit(const CTransaction& tx, const isminefilter& filter) const
1375-
{
1376-
assert(false && "CWallet::GetCredit(const CTransaction&, const isminefilter&): this method should not be used anymore");
1377-
1378-
CAmountMap nCredit;
1379-
for (const CTxOut& txout : tx.vout)
1380-
{
1381-
nCredit += GetCredit(txout, filter);
1382-
if (!MoneyRange(nCredit))
1383-
throw std::runtime_error(std::string(__func__) + ": value out of range");
1384-
}
1385-
return nCredit;
1386-
}
1387-
13881374
CAmountMap CWallet::GetChange(const CWalletTx& wtx) const {
13891375
CAmountMap nChange;
13901376
for (unsigned int i = 0; i < wtx.tx->vout.size(); ++i) {

src/wallet/wallet.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1076,7 +1076,6 @@ class CWallet final : public CCryptoKeyStore, public CValidationInterface
10761076
CAmountMap GetDebit(const CTransaction& tx, const isminefilter& filter) const;
10771077
/** Returns whether all of the inputs match the filter */
10781078
bool IsAllFromMe(const CTransaction& tx, const isminefilter& filter) const;
1079-
CAmountMap GetCredit(const CTransaction& tx, const isminefilter& filter) const;
10801079
CAmountMap GetChange(const CTransaction& tx) const;
10811080

10821081
// ELEMENTS:

0 commit comments

Comments
 (0)