mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-08 10:31:50 -05:00
Switch to GetTransactionAncestry() in OutputEligibleForSpending
This commit is contained in:
parent
475a385a80
commit
4784751547
1 changed files with 4 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue