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

Function channel_control_errmsg

lightningd/channel_control.c:1711–1727  ·  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

1709 * the user know out of an abundance of politeness.
1710 * After, we forward the event onto the standard `channel_errmsg`. */
1711static void channel_control_errmsg(struct channel *channel,
1712 struct peer_fd *peer_fd,
1713 const char *desc,
1714 const u8 *err_for_them,
1715 bool disconnect,
1716 bool warning)
1717{
1718 struct lightningd *ld = channel->peer->ld;
1719 struct splice_command *cc = splice_command_for_chan(ld, channel);
1720 if (cc && disconnect) {
1721 was_pending(command_fail(cc->cmd, SPLICE_CHANNEL_ERROR,
1722 "Splice command failed:"
1723 " %s", desc));
1724 }
1725
1726 channel_errmsg(channel, peer_fd, desc, err_for_them, disconnect, warning);
1727}
1728
1729bool peer_start_channeld(struct channel *channel,
1730 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