From c17af5d2dd9ddd0888aa74648948ccecfd243453 Mon Sep 17 00:00:00 2001 From: Gregory Sanders Date: Wed, 22 May 2019 07:52:37 -0400 Subject: [PATCH] Delete unused non-CWalletTx GetCredit --- src/wallet/wallet.cpp | 14 -------------- src/wallet/wallet.h | 1 - 2 files changed, 15 deletions(-) diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index e494e080c6..5af4f97cc7 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -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) { diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h index 2c8e65bd4d..1324aa2417 100644 --- a/src/wallet/wallet.h +++ b/src/wallet/wallet.h @@ -1159,7 +1159,6 @@ public: 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: