| 61 | } |
| 62 | |
| 63 | static bool can_carry_onionmsg(const struct gossmap *map, |
| 64 | const struct gossmap_chan *c, |
| 65 | int dir, |
| 66 | struct amount_msat amount UNUSED, |
| 67 | void *arg UNUSED) |
| 68 | { |
| 69 | const struct gossmap_node *n; |
| 70 | |
| 71 | /* Don't try to use disabled channels! */ |
| 72 | if (!c->half[dir].enabled) |
| 73 | return false; |
| 74 | |
| 75 | /* Our local additions are always fine, since we checked features then */ |
| 76 | if (gossmap_chan_is_localmod(map, c)) |
| 77 | return true; |
| 78 | |
| 79 | /* Check features of recipient */ |
| 80 | n = gossmap_nth_node(map, c, !dir); |
| 81 | return gossmap_node_get_feature(map, n, OPT_ONION_MESSAGES) != -1; |
| 82 | } |
| 83 | |
| 84 | static void local_mods_remove_channels(struct gossmap_localmods *mods, |
| 85 | const struct gossmap *gossmap, |
nothing calls this directly
no test coverage detected