diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h --- a/src/wallet/wallet.h +++ b/src/wallet/wallet.h @@ -1286,11 +1286,6 @@ */ CTxDestination AddAndGetDestinationForScript(const CScript &script, OutputType); - - /** Whether a given output is spendable by this wallet */ - bool OutputEligibleForSpending( - const COutput &output, - const CoinEligibilityFilter &eligibility_filter) const; }; /** A key allocated from the key pool. */ diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -2570,30 +2570,6 @@ 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; - g_mempool.GetTransactionAncestry(output.tx->GetId(), ancestors, - descendants); - if (ancestors > eligibility_filter.max_ancestors || - descendants > eligibility_filter.max_descendants) { - return false; - } - - return true; -} - bool CWallet::SelectCoinsMinConf( const Amount nTargetValue, const CoinEligibilityFilter &eligibility_filter, std::vector groups, std::set &setCoinsRet,