Commit 7fb35ec
f - Add rbf/rbf_sync methods to FundingTemplate
Add dedicated methods that handle the prior contribution logic
internally — returning the adjusted prior when possible, re-running coin
selection when needed (insufficient fee buffer or low max_feerate), or
creating a fee-bump-only contribution when no prior exists.
Also:
- Add force_coin_selection parameter to build_funding_contribution! so
rbf/rbf_sync can force coin selection for splice-out RBF (where the
channel balance alone is insufficient) and fee-bump-only cases, while
splice_out_sync continues to skip it (fees from channel balance)
- Remove take_prior_contribution; replace with prior_contribution()
returning Option<&PriorContribution> for inspection
- Add value_added()/outputs() accessors to FundingContribution and
PriorContribution
- Guard against max_feerate < adjusted prior's feerate
- Update and add tests
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 21fe913 commit 7fb35ec
2 files changed
+408
-59
lines changed
0 commit comments