From 43e04d13b1ffc02b1082176e87f420198b40c7b1 Mon Sep 17 00:00:00 2001 From: Karl-Johan Alm Date: Thu, 15 Mar 2018 14:33:33 +0900 Subject: [PATCH] wallet: Remove deprecated OutputEligibleForSpending --- src/wallet/wallet.cpp | 17 ----------------- src/wallet/wallet.h | 3 --- 2 files changed, 20 deletions(-) diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 3c7e3302f..e6c513a53 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -2414,23 +2414,6 @@ const CTxOut& CWallet::FindNonChangeParentOutput(const CTransaction& tx, int out return ptx->vout[n]; } -bool CWallet::OutputEligibleForSpending(const COutput& output, const CoinEligibilityFilter& eligibility_filter) const -{ - if (!output.fSpendable) - return false; - - if (output.nDepth < (output.tx->IsFromMe(ISMINE_ALL) ? eligibility_filter.conf_mine : eligibility_filter.conf_theirs)) - return false; - - size_t ancestors, descendants; - mempool.GetTransactionAncestry(output.tx->GetHash(), ancestors, descendants); - if (ancestors > eligibility_filter.max_ancestors || descendants > eligibility_filter.max_descendants) { - return false; - } - - return true; -} - bool CWallet::SelectCoinsMinConf(const CAmount& nTargetValue, const CoinEligibilityFilter& eligibility_filter, std::vector groups, std::set& setCoinsRet, CAmount& nValueRet, const CoinSelectionParams& coin_selection_params, bool& bnb_used) const { diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h index 6c8063c47..122649d57 100644 --- a/src/wallet/wallet.h +++ b/src/wallet/wallet.h @@ -1188,9 +1188,6 @@ public: */ void LearnAllRelatedScripts(const CPubKey& key); - /** Whether a given output is spendable by this wallet */ - bool OutputEligibleForSpending(const COutput& output, const CoinEligibilityFilter& eligibility_filter) const; - /** set a single wallet flag */ void SetWalletFlag(uint64_t flags);