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

Function openingd_failed

lightningd/opening_control.c:622–649  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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