From 47847515473b054929af0c8de3d54b6672500cab Mon Sep 17 00:00:00 2001 From: Karl-Johan Alm Date: Thu, 8 Mar 2018 12:16:16 -0500 Subject: Switch to GetTransactionAncestry() in OutputEligibleForSpending --- src/wallet/wallet.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/wallet') diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 306f628196..eed17c2800 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -2469,8 +2469,11 @@ bool CWallet::OutputEligibleForSpending(const COutput& output, const CoinEligibi if (output.nDepth < (output.tx->IsFromMe(ISMINE_ALL) ? eligibility_filter.conf_mine : eligibility_filter.conf_theirs)) return false; - if (!mempool.TransactionWithinChainLimit(output.tx->GetHash(), eligibility_filter.max_ancestors, eligibility_filter.max_descendants)) + int64_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; } -- cgit v1.2.3