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

Function signpsbt_done

plugins/funder.c:136–164  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

134}
135
136static struct command_result *
137signpsbt_done(struct command *cmd,
138 const char *buf,
139 const jsmntok_t *result,
140 struct pending_open *open)
141{
142 struct wally_psbt *signed_psbt;
143 const char *err;
144
145 plugin_log(cmd->plugin, LOG_DBG,
146 "`signpsbt` done for channel %s",
147 type_to_string(tmpctx, struct channel_id,
148 &open->channel_id));
149 err = json_scan(tmpctx, buf, result,
150 "{signed_psbt:%}",
151 JSON_SCAN_TAL(cmd, json_to_psbt, &signed_psbt));
152
153 if (err)
154 plugin_err(cmd->plugin,
155 "`signpsbt` payload did not scan %s: %*.s",
156 err, json_tok_full_len(result),
157 json_tok_full(buf, result));
158
159 /* This finishes the open (successfully!) */
160 list_del_from(&pending_opens, &open->list);
161 tal_free(open);
162
163 return command_hook_cont_psbt(cmd, signed_psbt);
164}
165
166static struct command_result *
167json_openchannel2_sign_call(struct command *cmd,

Callers

nothing calls this directly

Calls 9

list_del_fromFunction · 0.85
tal_freeFunction · 0.85
command_hook_cont_psbtFunction · 0.85
plugin_logFunction · 0.70
plugin_errFunction · 0.70
type_to_stringClass · 0.50
json_scanFunction · 0.50
json_tok_full_lenFunction · 0.50
json_tok_fullFunction · 0.50

Tested by

no test coverage detected