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

Expose close_to up through multifundchannel + fundchannel #4132

Merged
merged 5 commits into from
Oct 16, 2020

Conversation

niftynei
Copy link
Collaborator

We've had close_to available on fundchannel_start for a while now. This wires it all the way through to general fundchannel users.

@niftynei niftynei added this to the v0.9.2 milestone Oct 15, 2020
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 c256ce1

Some changes are in wrong commit though, needs rebase...

@@ -516,6 +524,8 @@ param_destinations_array(struct command *cmd, const char *name,
p_opt_def("announce", param_bool, &announce, true),
p_opt_def("push_msat", param_msat, &push_msat,
AMOUNT_MSAT(0)),
/* FIXME: do address validation here */
Copy link
Contributor

Choose a reason for hiding this comment

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

Remove FIXME? Or turn into a note that opening will fail if it's not valid anyway...

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Left the fixme, added a note about validity and 'eventually failing'.

This will allow us to let `fundchannel` handle a close to address, also
Finally, extends the 'close_to' functionality up to the flagship 'open a
channel' command.

Changelog-Added: JSON-API `fundchannel` now accepts an optional 'close_to' param, a bitcoin address that the channel funding should be sent to on close. Requires `opt_upfront_shutdownscript`
Allows us to more easily pass through args to `fundchannel` while still
using the utility function's funding + open confirmation logics
We need this so we can verify the 'close_to' result
Since `fundchannel` now supports the 'close_to' argument, we can remove
all the logic needed to call fundchannel_start here.

Underneath, we're still calling `fundchannel_start`, we're just one (or
two, if you count multifundchannel) call levels away from it now.
@niftynei
Copy link
Collaborator Author

Ok, misplaced changes have been moved to the correct commits; FIXME has been additionally detailed.

@rustyrussell
Copy link
Contributor

Ack 9650a86

@rustyrussell rustyrussell merged commit 8f253b2 into ElementsProject:master Oct 16, 2020
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