| 123 | } |
| 124 | |
| 125 | static void tell_channeld_htlc_failed(const struct htlc_in *hin, |
| 126 | const struct failed_htlc *failed_htlc) |
| 127 | { |
| 128 | /* Tell peer, if we can. */ |
| 129 | if (!hin->key.channel->owner) |
| 130 | return; |
| 131 | |
| 132 | /* onchaind doesn't care, it can't do anything but wait */ |
| 133 | if (!channel_active(hin->key.channel)) |
| 134 | return; |
| 135 | |
| 136 | subd_send_msg(hin->key.channel->owner, |
| 137 | take(towire_channeld_fail_htlc(NULL, failed_htlc))); |
| 138 | } |
| 139 | |
| 140 | static void fail_in_htlc(struct htlc_in *hin, |
| 141 | const struct onionreply *failonion TAKES) |
no test coverage detected