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

Function opening_funder_start_replied

lightningd/opening_control.c:331–368  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

329}
330
331static void opening_funder_start_replied(struct subd *openingd, const u8 *resp,
332 const int *fds,
333 struct funding_channel *fc)
334{
335 bool supports_shutdown_script;
336
337 /* It will tell us the resulting channel type (which can vary
338 * by ZEROCONF and SCID_ALIAS), so free old one */
339 tal_free(fc->channel_type);
340
341 if (!fromwire_openingd_funder_start_reply(fc, resp,
342 &fc->funding_scriptpubkey,
343 &supports_shutdown_script,
344 &fc->channel_type)) {
345 log_broken(fc->uc->log,
346 "bad OPENING_FUNDER_REPLY %s",
347 tal_hex(resp, resp));
348 was_pending(command_fail(fc->cmd, LIGHTNINGD,
349 "bad OPENING_FUNDER_REPLY %s",
350 tal_hex(fc->cmd, resp)));
351 goto failed;
352 }
353
354 /* If we're not using the upfront shutdown script, forget it */
355 if (!supports_shutdown_script)
356 fc->our_upfront_shutdown_script =
357 tal_free(fc->our_upfront_shutdown_script);
358
359 funding_started_success(fc);
360
361 /* Mark that we're in-flight */
362 fc->inflight = true;
363 return;
364
365failed:
366 /* Frees fc too */
367 tal_free(fc->uc);
368}
369
370static void opening_funder_finished(struct subd *openingd, const u8 *resp,
371 const int *fds,

Callers 1

openingd_msgFunction · 0.85

Calls 5

tal_freeFunction · 0.85
tal_hexFunction · 0.85
funding_started_successFunction · 0.85
was_pendingFunction · 0.70
command_failFunction · 0.70

Tested by

no test coverage detected