| 185 | } |
| 186 | |
| 187 | const char *fmt_flow_full(const tal_t *ctx, |
| 188 | const struct route_query *rq, |
| 189 | const struct flow *flow) |
| 190 | { |
| 191 | struct amount_msat amt = flow->delivers; |
| 192 | char *str = fmt_amount_msat(ctx, flow->delivers); |
| 193 | |
| 194 | for (int i = tal_count(flow->path) - 1; i >= 0; i--) { |
| 195 | struct short_channel_id_dir scidd; |
| 196 | struct amount_msat min, max; |
| 197 | scidd.scid = gossmap_chan_scid(rq->gossmap, flow->path[i]); |
| 198 | scidd.dir = flow->dirs[i]; |
| 199 | if (!amount_msat_add_fee(&amt, |
| 200 | flow->path[i]->half[scidd.dir].base_fee, |
| 201 | flow->path[i]->half[scidd.dir].proportional_fee)) |
| 202 | abort(); |
| 203 | get_constraints(rq, flow->path[i], scidd.dir, &min, &max); |
| 204 | tal_append_fmt(&str, " <- %s %s (cap=%s,fee=%u+%u,delay=%u)", |
| 205 | fmt_amount_msat(tmpctx, amt), |
| 206 | fmt_short_channel_id_dir(tmpctx, &scidd), |
| 207 | fmt_amount_msat(tmpctx, max), |
| 208 | flow->path[i]->half[scidd.dir].base_fee, |
| 209 | flow->path[i]->half[scidd.dir].proportional_fee, |
| 210 | flow->path[i]->half[scidd.dir].delay); |
| 211 | } |
| 212 | return str; |
| 213 | } |
| 214 | |
| 215 | #ifndef SUPERVERBOSE_ENABLED |
| 216 | #undef SUPERVERBOSE |
no test coverage detected