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

Function funding_started_success

lightningd/opening_control.c:304–329  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

302}
303
304static void funding_started_success(struct funding_channel *fc)
305{
306 struct json_stream *response;
307 struct command *cmd = fc->cmd;
308 char *out;
309
310 response = json_stream_success(cmd);
311 out = encode_scriptpubkey_to_addr(cmd,
312 chainparams,
313 fc->funding_scriptpubkey,
314 tal_bytelen(fc->funding_scriptpubkey));
315 if (out) {
316 json_add_string(response, "funding_address", out);
317 json_add_hex_talarr(response, "scriptpubkey",
318 fc->funding_scriptpubkey);
319 if (fc->our_upfront_shutdown_script)
320 json_add_hex_talarr(response, "close_to", fc->our_upfront_shutdown_script);
321 json_add_channel_type(response, "channel_type", fc->channel_type);
322 json_add_string(response, "warning_usage",
323 "The funding transaction MUST NOT be broadcast until after channel establishment has been successfully completed by running `fundchannel_complete`");
324 }
325
326 /* Clear this so cancel doesn't think it's still in progress */
327 fc->cmd = NULL;
328 was_pending(command_success(cmd, response));
329}
330
331static void opening_funder_start_replied(struct subd *openingd, const u8 *resp,
332 const int *fds,

Callers 1

Calls 8

tal_bytelenFunction · 0.85
json_add_hex_talarrFunction · 0.85
json_add_channel_typeFunction · 0.85
json_stream_successFunction · 0.70
was_pendingFunction · 0.70
command_successFunction · 0.70
json_add_stringFunction · 0.50

Tested by

no test coverage detected