mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-03-17 08:52:45 +00:00
a067ca34106817565e02daca52b3175266714c25 [doc] coin selection filters by max cluster count, not descendant (glozow) f7be5fb8fc7d2a5831810a0b91666fc774b64b8f [refactor] rename variable to clarify it is unused and cluster count (glozow) Pull request description: Followup to #33629. Fix misleading docs and variable names. Namely, `getTransactionAncestry` returns the cluster count, not max descendant count of ancestor set (not worth reimplementing as it is merely a heuristic). No behavior changes - I don’t think much needs to be changed for the first release containing cluster mempool. Current `CoinEligibilityFilter`s enforce a maximum ancestor count (summed across all outputs, potentially overestimating) and max descendant count across ancestors of the output. Since #33629, these filters have started using cluster count instead of max desc count across ancestors. The change isn’t dangerous, as the cluster count bounds descendant count as well. Currently, the wallet is essentially enforcing a mixture of both limits - this is good while we are transitioning. Note that the cluster count enforced is 25, not 64, since it's grabbing the node's descendant count limit. While it is not an apples-to-apples comparison, a cluster count limit of 25 helps us avoid busting legacy descendant limits (which will be common on the network for a while). Potential things for the future, out of scope for this PR: - When we get rid of the ancestor/descendant config options, `getPackageLimits` can probably be replaced with hard-coded values. - Change the `OutputGroup`s to track the actual cluster count that results from spending these outputs and merging their clusters. - Loosen from 25 after that policy is no longer common. - Clean up `getPackageLimits`. ACKs for top commit: achow101: ACK a067ca34106817565e02daca52b3175266714c25 ismaelsadeeq: reACK a067ca34106817565e02daca52b3175266714c25 rkrux: crACK a067ca34106817565e02daca52b3175266714c25 Tree-SHA512: d7cacd5bf668d42e26e8b83e42a42c280929c3bfd554c3db1de605e5939f8b36c14ecfd2839abeb4eec352363df1891b3420a693c250916391ab10a5ce26396b