FIXME: This is slow! */
| 627 | |
| 628 | /* FIXME: This is slow! */ |
| 629 | static bool dst_is_excluded(const struct gossmap *gossmap, |
| 630 | const struct gossmap_chan *c, |
| 631 | int dir, |
| 632 | const struct node_id *nodes) |
| 633 | { |
| 634 | struct node_id dstid; |
| 635 | |
| 636 | /* Premature optimization */ |
| 637 | if (!tal_count(nodes)) |
| 638 | return false; |
| 639 | |
| 640 | gossmap_node_get_id(gossmap, gossmap_nth_node(gossmap, c, !dir), |
| 641 | &dstid); |
| 642 | for (size_t i = 0; i < tal_count(nodes); i++) { |
| 643 | if (node_id_eq(&dstid, &nodes[i])) |
| 644 | return true; |
| 645 | } |
| 646 | return false; |
| 647 | } |
| 648 | |
| 649 | static bool payment_route_check(const struct gossmap *gossmap, |
| 650 | const struct gossmap_chan *c, |
no test coverage detected