If an HTLC times out, we need to free entire set, since we could be processing * it in invoice.c right now. */
| 9 | /* If an HTLC times out, we need to free entire set, since we could be processing |
| 10 | * it in invoice.c right now. */ |
| 11 | static void htlc_set_hin_destroyed(struct htlc_in *hin, |
| 12 | struct htlc_set *set) |
| 13 | { |
| 14 | for (size_t i = 0; i < tal_count(set->htlcs); i++) { |
| 15 | if (set->htlcs[i] == hin) { |
| 16 | /* Don't try to re-fail this HTLC! */ |
| 17 | tal_arr_remove(&set->htlcs, i); |
| 18 | /* Kind of the correct failure code. */ |
| 19 | htlc_set_fail(set, take(towire_mpp_timeout(NULL))); |
| 20 | return; |
| 21 | } |
| 22 | } |
| 23 | abort(); |
| 24 | } |
| 25 | |
| 26 | static void destroy_htlc_set(struct htlc_set *set, |
| 27 | struct htlc_set_map *map) |
nothing calls this directly
no test coverage detected