HomePhabricator

[refactor] Make TransactionWithinChainLimit more flexible

Description

[refactor] Make TransactionWithinChainLimit more flexible

Summary:

  • Add GetTransactionAncestry to CTxMemPool for general purpose chain limit checking
  • Switch to GetTransactionAncestry() in OutputEligibleForSpending
  • Remove deprecated TransactionWithinChainLimit
  • wallet: Strictly greater than for ancestor caps
  • wallet: Switch to using ancestor/descendant limits

Instead of combining the -limitancestorcount and -limitdescendantcount into a nMaxChainLength, this commit uses each one separately in the coin eligibility filters.

  • test: Add MempoolAncestryTests

This is a backport of Core PR12634

Depends on D3336 and D3342

Test Plan:

make check
./test/functional/test_runner.py

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Subscribers: Fabien

Differential Revision: https://reviews.bitcoinabc.org/D3343

Details

Provenance
Karl-Johan Alm <karljohan-alm@garage.co.jp>Authored on Mar 8 2018, 17:15
deadalnixCommitted on Jun 19 2019, 12:39
deadalnixPushed on Jun 19 2019, 12:39
Reviewer
Restricted Project
Differential Revision
D3343: [refactor] Make TransactionWithinChainLimit more flexible
Parents
rABCc898daa3c1d7: clarify GetBlockScriptFlags
Branches
Unknown
Tags
Unknown