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

Function onchain_error

lightningd/onchain_control.c:1751–1767  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

1749
1750/* Only error onchaind can get is if it dies. */
1751static void onchain_error(struct channel *channel,
1752 struct peer_fd *pps UNUSED,
1753 const char *desc,
1754 const u8 *err_for_them UNUSED,
1755 bool disconnect UNUSED,
1756 bool warning UNUSED)
1757{
1758 channel_set_owner(channel, NULL);
1759
1760 /* This happens on shutdown: fine */
1761 if (channel->peer->ld->state == LD_STATE_SHUTDOWN)
1762 return;
1763
1764 /* FIXME: re-launch? */
1765 log_broken(channel->log, "%s", desc);
1766 channel_set_billboard(channel, true, desc);
1767}
1768
1769/* With a reorg, this can get called multiple times; each time we'll kill
1770 * 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