Objectives
Implement CPFP functionality to boost low-fee parent transactions by creating child transactions with high fee rates. This feature should support boosting multiple transactions with a single CPFP transaction and consider all unconfirmed ancestors in fee rate calculations.
Proposed Implementation
- Parent Output: Use
CanonicalUnspents to select the parent’s unconfirmed output as a must_select input.
- High Fee Rate: Set a high
target_feerate in SelectorParams to make the package attractive to miners.
- Anti-Fee-Sniping: Disable it to avoid delays(do not add it).
- API Extension: Add a
CpFpParams struct to encapsulate parent details and fee rate.
Rationale
- Ensures the parent output is spent, linking the transactions.
- High fee rate incentivizes miners to include both.
- Disabling anti-fee-sniping avoids unnecessary delays.
Add examples/cpfp.rs to show CPFP boosting a stuck transaction.