From 0746330f8f6bbd37b38eed46b6f8350b48a712fa 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 58c40a9dba..5091f6b19d 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -1371,20 +1371,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 87d22bc346..36d697c34a 100644 --- a/src/wallet/wallet.h +++ b/src/wallet/wallet.h @@ -1076,7 +1076,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: