FIXME: This is slow! */
| 648 | |
| 649 | /* FIXME: This is slow! */ |
| 650 | static bool dst_is_excluded(const struct gossmap *gossmap, |
| 651 | const struct gossmap_chan *c, |
| 652 | int dir, |
| 653 | const struct node_id *nodes) |
| 654 | { |
| 655 | struct node_id dstid; |
| 656 | |
| 657 | /* Premature optimization */ |
| 658 | if (!tal_count(nodes)) |
| 659 | return false; |
| 660 | |
| 661 | gossmap_node_get_id(gossmap, gossmap_nth_node(gossmap, c, !dir), |
| 662 | &dstid); |
| 663 | for (size_t i = 0; i < tal_count(nodes); i++) { |
| 664 | if (node_id_eq(&dstid, &nodes[i])) |
| 665 | return true; |
| 666 | } |
| 667 | return false; |
| 668 | } |
| 669 | |
| 670 | static bool payment_route_check(const struct gossmap *gossmap, |
| 671 | const struct gossmap_chan *c, |
no test coverage detected