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

Function onchain_error

lightningd/onchain_control.c:1882–1898  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

1880
1881/* Only error onchaind can get is if it dies. */
1882static void onchain_error(struct channel *channel,
1883 struct peer_fd *pps UNUSED,
1884 const char *desc,
1885 const u8 *err_for_them UNUSED,
1886 bool disconnect UNUSED,
1887 bool warning UNUSED)
1888{
1889 channel_set_owner(channel, NULL);
1890
1891 /* This happens on shutdown: fine */
1892 if (channel->peer->ld->state == LD_STATE_SHUTDOWN)
1893 return;
1894
1895 /* FIXME: re-launch? */
1896 log_broken(channel->log, "%s", desc);
1897 channel_set_billboard(channel, true, desc);
1898}
1899
1900/* With a reorg, this can get called multiple times; each time we'll kill
1901 * 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