| 147 | } |
| 148 | |
| 149 | static struct command_result * |
| 150 | listpeerchannels_getroute_done(struct command *cmd, |
| 151 | const char *method, |
| 152 | const char *buf, |
| 153 | const jsmntok_t *result, |
| 154 | struct getroute_info *info) |
| 155 | { |
| 156 | struct gossmap *gossmap; |
| 157 | struct gossmap_localmods *mods; |
| 158 | struct command_result *res; |
| 159 | |
| 160 | /* Get local knowledge */ |
| 161 | mods = gossmods_from_listpeerchannels(tmpctx, &local_id, |
| 162 | buf, result, true, |
| 163 | gossmod_add_localchan, NULL); |
| 164 | |
| 165 | /* Overlay local knowledge for dijkstra */ |
| 166 | gossmap = get_gossmap(); |
| 167 | gossmap_apply_localmods(gossmap, mods); |
| 168 | res = try_route(cmd, gossmap, info); |
| 169 | gossmap_remove_localmods(gossmap, mods); |
| 170 | |
| 171 | return res; |
| 172 | } |
| 173 | |
| 174 | static struct command_result *json_getroute(struct command *cmd, |
| 175 | const char *buffer, |
nothing calls this directly
no test coverage detected