MCPcopy Create free account
hub / github.com/ElementsProject/lightning / listpeerchannels_getroute_done

Function listpeerchannels_getroute_done

plugins/topology.c:149–172  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

147}
148
149static struct command_result *
150listpeerchannels_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
174static struct command_result *json_getroute(struct command *cmd,
175 const char *buffer,

Callers

nothing calls this directly

Calls 4

gossmap_apply_localmodsFunction · 0.85
try_routeFunction · 0.85
gossmap_remove_localmodsFunction · 0.85
get_gossmapFunction · 0.70

Tested by

no test coverage detected