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

Function channel_control_errmsg

lightningd/channel_control.c:1759–1775  ·  view source on GitHub ↗

If we get a disconnecting warning or error during a splice command, let * the user know out of an abundance of politeness. * After, we forward the event onto the standard `channel_errmsg`. */

Source from the content-addressed store, hash-verified

1757 * the user know out of an abundance of politeness.
1758 * After, we forward the event onto the standard `channel_errmsg`. */
1759static void channel_control_errmsg(struct channel *channel,
1760 struct peer_fd *peer_fd,
1761 const char *desc,
1762 const u8 *err_for_them,
1763 bool disconnect,
1764 bool warning)
1765{
1766 struct lightningd *ld = channel->peer->ld;
1767 struct splice_command *cc = splice_command_for_chan(ld, channel);
1768 if (cc && disconnect) {
1769 was_pending(command_fail(cc->cmd, SPLICE_CHANNEL_ERROR,
1770 "Splice command failed:"
1771 " %s", desc));
1772 }
1773
1774 channel_errmsg(channel, peer_fd, desc, err_for_them, disconnect, warning);
1775}
1776
1777bool peer_start_channeld(struct channel *channel,
1778 struct peer_fd *peer_fd,

Callers

nothing calls this directly

Calls 4

splice_command_for_chanFunction · 0.85
channel_errmsgFunction · 0.85
was_pendingFunction · 0.70
command_failFunction · 0.70

Tested by

no test coverage detected