Page MenuHomePhabricator

[refactor] Make TransactionWithinChainLimit more flexible
ClosedPublic

Authored by deadalnix on Jun 14 2019, 21:26.

Details

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

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Fabien requested changes to this revision.Jun 17 2019, 07:07
Fabien added a subscriber: Fabien.
Fabien added inline comments.
src/test/mempool_tests.cpp
913 ↗(On Diff #9460)

GetHash() => GetId() everywhere

916 ↗(On Diff #9460)

Dito, see comment in D3342.

This revision now requires changes to proceed.Jun 17 2019, 07:09
This revision is now accepted and ready to land.Jun 19 2019, 06:05