aboutsummaryrefslogtreecommitdiff
path: root/src/wallet
diff options
context:
space:
mode:
authorKarl-Johan Alm <karljohan-alm@garage.co.jp>2018-03-08 12:16:16 -0500
committerKarl-Johan Alm <karljohan-alm@garage.co.jp>2018-06-11 19:04:55 +0900
commit47847515473b054929af0c8de3d54b6672500cab (patch)
tree17029c41d7022675c4024d0c35ff22d6bb5f5991 /src/wallet
parent475a385a80198a46a6d99846f99b968f04e9b470 (diff)
Switch to GetTransactionAncestry() in OutputEligibleForSpending
Diffstat (limited to 'src/wallet')
-rw-r--r--src/wallet/wallet.cpp5
1 files changed, 4 insertions, 1 deletions
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;
}