| 198 | } |
| 199 | |
| 200 | static const char *describe_capacity(const tal_t *ctx, |
| 201 | const struct route_query *rq, |
| 202 | const struct short_channel_id_dir *scidd, |
| 203 | struct amount_msat amount) |
| 204 | { |
| 205 | for (int i = tal_count(rq->layers) - 1; i >= 0; i--) { |
| 206 | if (layer_created(rq->layers[i], scidd->scid)) { |
| 207 | return tal_fmt(ctx, " (created by layer %s) isn't big enough to carry %s.", |
| 208 | layer_name(rq->layers[i]), |
| 209 | fmt_amount_msat(tmpctx, amount)); |
| 210 | } |
| 211 | } |
| 212 | |
| 213 | return tal_fmt(ctx, "isn't big enough to carry %s.", |
| 214 | fmt_amount_msat(tmpctx, amount)); |
| 215 | } |
| 216 | |
| 217 | /* We failed to find a flow at all. Why? */ |
| 218 | const char *explain_failure(const tal_t *ctx, |
no test coverage detected