Update to select funding inputs before sending open_channel2 and splice_init and add excess to requests #2924
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is an alternative to PR #2903 which does not assume modifying bitcoind to add excess to a selected output during coin selection (see PR 30080).
When funds are added to a dual funded channel, or spliced into an existing channel, our channel should be credited in their channel balance any excess that is added to the channel over what the user requests. Currently if a changeless solution is found for funding, excess value over what was requested will be treated as waste and used as extra fees.
We introduce a new optional funding contributions parameter to
InteractiveTxBuilder
. When set, we will start by processing the passed in funding inputs/outputs instead of usingInteractiveTxFunder
to fund the transaction. The call toInteractiveTxFunder
is now made before sendingopen_channel2
orsplice_init
and the results are then passed toInteractiveTxBuilder
.This PR builds on PR #2887 - Use final spec values for splicing and should be rebased once the final official splicing code is merged.