df: pass back 'close_to' for completed/commitment secured channels

When commitments are secured, also return the 'close_to' script if we've
got a local_upfront_shutdown_script set.
This commit is contained in:
niftynei
2020-10-26 14:40:00 -05:00
committed by neil saitug
parent 405453859c
commit 6077eca660
4 changed files with 35 additions and 2 deletions

View File

@@ -933,6 +933,9 @@ static void opener_commit_received(struct subd *dualopend,
json_add_bool(response, "commitments_secured", true);
/* For convenience sake, we include the funding outnum */
json_add_num(response, "funding_outnum", funding_outnum);
if (local_upfront_shutdown_script)
json_add_hex_talarr(response, "close_to",
local_upfront_shutdown_script);
/* Now that we've got the final PSBT, save it */
channel->psbt = tal_steal(channel, psbt);
wallet_channel_save(uc->fc->cmd->ld->wallet, channel);