mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-02-22 06:41:44 +01:00
mfc-df: after openchannel_signed is finished, we call finished
We done!?
This commit is contained in:
parent
3e19b6c8f5
commit
c6b45e052b
3 changed files with 5 additions and 37 deletions
|
@ -1635,9 +1635,6 @@ after_signpsbt(struct command *cmd,
|
|||
return send_outreq(mfc->cmd->plugin, req);
|
||||
}
|
||||
|
||||
static struct command_result *
|
||||
multifundchannel_finished(struct multifundchannel_command *mfc);
|
||||
|
||||
static struct command_result *
|
||||
after_sendpsbt(struct command *cmd,
|
||||
const char *buf,
|
||||
|
@ -1677,7 +1674,7 @@ after_sendpsbt(struct command *cmd,
|
|||
And finally we are done.
|
||||
*/
|
||||
|
||||
static struct command_result *
|
||||
struct command_result *
|
||||
multifundchannel_finished(struct multifundchannel_command *mfc)
|
||||
{
|
||||
unsigned int i;
|
||||
|
|
|
@ -262,6 +262,9 @@ perform_fundchannel_complete(struct multifundchannel_command *mfc);
|
|||
struct command_result *
|
||||
perform_signpsbt(struct multifundchannel_command *mfc);
|
||||
|
||||
struct command_result *
|
||||
multifundchannel_finished(struct multifundchannel_command *mfc);
|
||||
|
||||
struct command_result *
|
||||
redo_multifundchannel(struct multifundchannel_command *mfc,
|
||||
const char *failing_method);
|
||||
|
|
|
@ -329,41 +329,9 @@ static bool update_node_psbt(const tal_t *ctx,
|
|||
static struct command_result *
|
||||
openchannel_finished(struct multifundchannel_command *mfc)
|
||||
{
|
||||
struct json_stream *out;
|
||||
|
||||
plugin_log(mfc->cmd->plugin, LOG_DBG,
|
||||
"mfc %"PRIu64": done.", mfc->id);
|
||||
|
||||
out = jsonrpc_stream_success(mfc->cmd);
|
||||
json_add_string(out, "tx", mfc->final_tx);
|
||||
json_add_string(out, "txid", mfc->final_txid);
|
||||
json_array_start(out, "channel_ids");
|
||||
for (size_t i = 0; i < tal_count(mfc->destinations); i++) {
|
||||
struct multifundchannel_destination *dest =
|
||||
&mfc->destinations[i];
|
||||
|
||||
json_object_start(out, NULL);
|
||||
json_add_node_id(out, "id", &dest->id);
|
||||
json_add_channel_id(out, "channel_id", &dest->channel_id);
|
||||
json_add_num(out, "outnum", dest->outnum);
|
||||
json_object_end(out);
|
||||
}
|
||||
json_array_end(out);
|
||||
|
||||
json_array_start(out, "failed");
|
||||
for (size_t i = 0; i < tal_count(mfc->removeds); i++) {
|
||||
struct multifundchannel_removed *rm =
|
||||
&mfc->removeds[i];
|
||||
json_object_start(out, NULL);
|
||||
json_add_node_id(out, "id", &rm->id);
|
||||
json_add_string(out, "method", rm->method);
|
||||
json_add_jsonstr(out, "error", rm->error);
|
||||
json_object_end(out);
|
||||
}
|
||||
json_array_end(out);
|
||||
|
||||
mfc->psbt = tal_free(mfc->psbt);
|
||||
return mfc_finished(mfc, out);
|
||||
return multifundchannel_finished(mfc);
|
||||
}
|
||||
|
||||
static struct command_result *
|
||||
|
|
Loading…
Add table
Reference in a new issue