Return description of why scidd is disabled scidd */
| 176 | |
| 177 | /* Return description of why scidd is disabled scidd */ |
| 178 | static const char *describe_disabled(const tal_t *ctx, |
| 179 | const struct route_query *rq, |
| 180 | const struct gossmap_chan *c, |
| 181 | const struct short_channel_id_dir *scidd) |
| 182 | { |
| 183 | for (int i = tal_count(rq->layers) - 1; i >= 0; i--) { |
| 184 | struct gossmap_node *dst = gossmap_nth_node(rq->gossmap, c, !scidd->dir); |
| 185 | struct node_id dstid; |
| 186 | |
| 187 | gossmap_node_get_id(rq->gossmap, dst, &dstid); |
| 188 | if (layer_disables_node(rq->layers[i], &dstid)) |
| 189 | return tal_fmt(ctx, "leads to node disabled by layer %s.", |
| 190 | layer_name(rq->layers[i])); |
| 191 | else if (layer_disables_chan(rq->layers[i], scidd)) { |
| 192 | return tal_fmt(ctx, "marked disabled by layer %s.", |
| 193 | layer_name(rq->layers[i])); |
| 194 | } |
| 195 | } |
| 196 | |
| 197 | return tal_fmt(ctx, "marked disabled by gossip message."); |
| 198 | } |
| 199 | |
| 200 | static const char *describe_capacity(const tal_t *ctx, |
| 201 | const struct route_query *rq, |
no test coverage detected