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

Function openingd_failed

lightningd/opening_control.c:587–614  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

585}
586
587static void openingd_failed(struct subd *openingd, const u8 *msg,
588 struct uncommitted_channel *uc)
589{
590 char *desc;
591
592 /* Since we're detaching from uc, we'll be unreferenced until
593 * our imminent exit (as will our parent, openingd->conn). */
594 notleak(openingd);
595 /* openingd->conn is set to NULL temporarily for this call, so: */
596 notleak(tal_parent(openingd));
597
598 if (!fromwire_openingd_failed(msg, msg, &desc)) {
599 log_broken(uc->log,
600 "bad OPENINGD_FAILED %s",
601 tal_hex(tmpctx, msg));
602 if (uc->fc)
603 was_pending(command_fail(uc->fc->cmd, LIGHTNINGD,
604 "bad OPENINGD_FAILED %s",
605 tal_hex(uc->fc->cmd, msg)));
606 tal_free(uc);
607 return;
608 }
609
610 /* Noop if we're not funder. */
611 opening_funder_failed_cancel_commands(uc, desc);
612 /* Detaches from ->peer */
613 tal_free(uc);
614}
615
616struct openchannel_hook_payload {
617 struct subd *openingd;

Callers 1

openingd_msgFunction · 0.85

Calls 6

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

Tested by

no test coverage detected