| 207 | } |
| 208 | |
| 209 | static 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 | |
| 224 | static void fail_in_htlc(struct htlc_in *hin, |
| 225 | const struct onionreply *failonion TAKES) |
no test coverage detected