diff options
| author | Karl-Johan Alm <[email protected]> | 2018-03-08 12:16:16 -0500 |
|---|---|---|
| committer | Karl-Johan Alm <[email protected]> | 2018-06-11 19:04:55 +0900 |
| commit | 47847515473b054929af0c8de3d54b6672500cab (patch) | |
| tree | 17029c41d7022675c4024d0c35ff22d6bb5f5991 /src/wallet/wallet.cpp | |
| parent | Add GetTransactionAncestry to CTxMemPool for general purpose chain limit chec... (diff) | |
| download | discoin-47847515473b054929af0c8de3d54b6672500cab.tar.xz discoin-47847515473b054929af0c8de3d54b6672500cab.zip | |
Switch to GetTransactionAncestry() in OutputEligibleForSpending
Diffstat (limited to 'src/wallet/wallet.cpp')
| -rw-r--r-- | src/wallet/wallet.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 306f62819..eed17c280 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; } |