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

Function onchain_error

lightningd/onchain_control.c:588–604  ·  view source on GitHub ↗

Only error onchaind can get is if it dies. */

Source from the content-addressed store, hash-verified

586
587/* Only error onchaind can get is if it dies. */
588static void onchain_error(struct channel *channel,
589 struct peer_fd *pps UNUSED,
590 const struct channel_id *channel_id UNUSED,
591 const char *desc,
592 bool warning UNUSED,
593 const u8 *err_for_them UNUSED)
594{
595 channel_set_owner(channel, NULL);
596
597 /* This happens on shutdown: fine */
598 if (channel->peer->ld->state == LD_STATE_SHUTDOWN)
599 return;
600
601 /* FIXME: re-launch? */
602 log_broken(channel->log, "%s", desc);
603 channel_set_billboard(channel, true, desc);
604}
605
606/* With a reorg, this can get called multiple times; each time we'll kill
607 * onchaind (like any other owner), and restart */

Callers

nothing calls this directly

Calls 2

channel_set_ownerFunction · 0.85
channel_set_billboardFunction · 0.85

Tested by

no test coverage detected