Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add excess_as_change flag to fundpsbt/utxopsbt #4368

Merged
merged 3 commits into from
Feb 4, 2021

Conversation

niftynei
Copy link
Collaborator

@niftynei niftynei commented Feb 3, 2021

For convenience, it's easier to allow the caller to request that a change output be added to a PSBT.

In the case where you want a PSBT and also want the output to be added
as a change address, use `excess_as_change` = true.

Generates a change address to use. If you want to pay the excess
elsewhere, you will have to add separately.

Changelog-Added: JSON-RPC: Add new parameter `excess_as_change` to fundpsbt+utxopsbt
have the estimated fee include all the weight, even fee outputs
Now that we've got an 'excess_as_change' flag, we can use it.

Further, make sure we test both directions on dual-funded channels
Copy link
Contributor

@rustyrussell rustyrussell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ack f036b2a

We could argue that the caller should do this, but it does handle a common case.

@niftynei niftynei merged commit 5b2be13 into ElementsProject:master Feb 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants