MCPcopy Create free account
hub / github.com/ElementsProject/lightning / fundchannel_complete_ok

Function fundchannel_complete_ok

plugins/spender/multifundchannel.c:726–750  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

724}
725
726static struct command_result *
727fundchannel_complete_ok(struct command *cmd,
728 const char *buf,
729 const jsmntok_t *result,
730 struct multifundchannel_destination *dest)
731{
732 struct multifundchannel_command *mfc = dest->mfc;
733 const jsmntok_t *channel_id_tok;
734
735 plugin_log(mfc->cmd->plugin, LOG_DBG,
736 "mfc %"PRIu64", dest %u: fundchannel_complete %s done.",
737 mfc->id, dest->index,
738 node_id_to_hexstr(tmpctx, &dest->id));
739
740 channel_id_tok = json_get_member(buf, result, "channel_id");
741 if (!channel_id_tok)
742 plugin_err(cmd->plugin,
743 "fundchannel_complete no channel_id: %.*s",
744 json_tok_full_len(result),
745 json_tok_full(buf, result));
746 json_to_channel_id(buf, channel_id_tok, &dest->channel_id);
747
748 dest->state = MULTIFUNDCHANNEL_COMPLETED;
749 return fundchannel_complete_done(dest);
750}
751
752static struct command_result *
753fundchannel_complete_err(struct command *cmd,

Callers

nothing calls this directly

Calls 8

plugin_logFunction · 0.50
node_id_to_hexstrFunction · 0.50
json_get_memberFunction · 0.50
plugin_errFunction · 0.50
json_tok_full_lenFunction · 0.50
json_tok_fullFunction · 0.50
json_to_channel_idFunction · 0.50

Tested by

no test coverage detected