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

Function fundchannel_start_err

plugins/spender/multifundchannel.c:1061–1088  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1059}
1060
1061static struct command_result *
1062fundchannel_start_err(struct command *cmd,
1063 const char *buf,
1064 const jsmntok_t *error,
1065 struct multifundchannel_destination *dest)
1066{
1067 plugin_log(dest->mfc->cmd->plugin, LOG_DBG,
1068 "mfc %"PRIu64", dest %u: "
1069 "failed! fundchannel_start %s: %.*s.",
1070 dest->mfc->id, dest->index,
1071 node_id_to_hexstr(tmpctx, &dest->id),
1072 json_tok_full_len(error),
1073 json_tok_full(buf, error));
1074 /*
1075 You might be wondering why we do not just use
1076 mfc_forward_error here.
1077 The reason is that other `fundchannel_start`
1078 commands are running in the meantime,
1079 and it is still ambiguous whether the opening
1080 of other destinations was started or not.
1081
1082 After all parallel `fundchannel_start`s have
1083 completed, we can then fail.
1084 */
1085
1086 fail_destination_tok(dest, buf, error);
1087 return fundchannel_start_done(dest);
1088}
1089
1090static void
1091fundchannel_start_dest(struct multifundchannel_destination *dest)

Callers

nothing calls this directly

Calls 6

fail_destination_tokFunction · 0.85
fundchannel_start_doneFunction · 0.85
plugin_logFunction · 0.50
node_id_to_hexstrFunction · 0.50
json_tok_full_lenFunction · 0.50
json_tok_fullFunction · 0.50

Tested by

no test coverage detected