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

Function openingd_failed

lightningd/opening_control.c:635–662  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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