| 674 | } |
| 675 | |
| 676 | double flows_probability(const tal_t *ctx, struct route_query *rq, |
| 677 | struct flow ***flows) |
| 678 | { |
| 679 | const tal_t *working_ctx = tal(ctx, tal_t); |
| 680 | struct reserve_hop *reservations = new_reservations(working_ctx, rq); |
| 681 | double probability = 1.0; |
| 682 | |
| 683 | for (size_t i = 0; i < tal_count(*flows); i++) { |
| 684 | probability *= flow_probability((*flows)[i], rq); |
| 685 | create_flow_reservations(rq, &reservations, (*flows)[i]); |
| 686 | } |
| 687 | tal_free(working_ctx); |
| 688 | return probability; |
| 689 | } |
| 690 | |
| 691 | const char *reduce_num_flows(const tal_t *ctx, |
| 692 | const struct route_query *rq, |
no test coverage detected