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

Function tell_channeld_htlc_failed

lightningd/peer_htlcs.c:209–222  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

207}
208
209static void tell_channeld_htlc_failed(const struct htlc_in *hin,
210 const struct failed_htlc *failed_htlc)
211{
212 /* Tell peer, if we can. */
213 if (!hin->key.channel->owner)
214 return;
215
216 /* onchaind doesn't care, it can't do anything but wait */
217 if (!channel_state_can_remove_htlc(hin->key.channel->state))
218 return;
219
220 subd_send_msg(hin->key.channel->owner,
221 take(towire_channeld_fail_htlc(NULL, failed_htlc)));
222}
223
224static void fail_in_htlc(struct htlc_in *hin,
225 const struct onionreply *failonion TAKES)

Callers 2

fail_in_htlcFunction · 0.85

Calls 3

subd_send_msgFunction · 0.70

Tested by

no test coverage detected