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

Function openingd_failed

lightningd/opening_control.c:613–640  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

611}
612
613static void openingd_failed(struct subd *openingd, const u8 *msg,
614 struct uncommitted_channel *uc)
615{
616 char *desc;
617
618 /* Since we're detaching from uc, we'll be unreferenced until
619 * our imminent exit (as will our parent, openingd->conn). */
620 notleak(openingd);
621 /* openingd->conn is set to NULL temporarily for this call, so: */
622 notleak(tal_parent(openingd));
623
624 if (!fromwire_openingd_failed(msg, msg, &desc)) {
625 log_broken(uc->log,
626 "bad OPENINGD_FAILED %s",
627 tal_hex(tmpctx, msg));
628 if (uc->fc)
629 was_pending(command_fail(uc->fc->cmd, LIGHTNINGD,
630 "bad OPENINGD_FAILED %s",
631 tal_hex(uc->fc->cmd, msg)));
632 tal_free(uc);
633 return;
634 }
635
636 /* Noop if we're not funder. */
637 opening_funder_failed_cancel_commands(uc, desc);
638 /* Detaches from ->peer */
639 tal_free(uc);
640}
641
642struct openchannel_hook_payload {
643 struct subd *openingd;

Callers 1

openingd_msgFunction · 0.85

Calls 6

tal_parentFunction · 0.85
tal_hexFunction · 0.85
tal_freeFunction · 0.85
was_pendingFunction · 0.70
command_failFunction · 0.70

Tested by

no test coverage detected