HomePhabricator

Use mempool's descendent count in the wallet code

Description

Use mempool's descendent count in the wallet code

Summary:

  • mempool: Add explicit max_descendants

TransactionWithinChainLimits would take a 'limit' and check it against ascendants and descendants. This is changed to take an explicit
max ancestors and max descendants value, and to test the corresponding value against its corresponding max.

  • mempool: Fix max descendants check

The chain limits check for max descendants would check the descendants of the transaction itself even though the description for -limitdescendantcount says 'any ancestor'. This commit corrects the descendant count check by finding the top parent transaction in the mempool and comparing against that.

  • mempool: Calculate descendant maximum thoroughly

This is a partial backport of Core PR12634

Test Plan:

make check

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Subscribers: Fabien

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

Details

Provenance
Karl-Johan Alm <karljohan-alm@garage.co.jp>Authored on May 21 2018, 02:15
deadalnixCommitted on Jun 17 2019, 23:51
jasonbcoxPushed on Jun 18 2019, 17:43
Reviewer
Restricted Project
Differential Revision
D3342: Use mempool's descendent count in the wallet code
Parents
rSTAGING4625244b514f: Restore minRelayTxFee
Branches
Unknown
Tags
Unknown