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

Function fmt_route_path

plugins/renepay/route.c:108–121  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

106}
107
108const char *fmt_route_path(const tal_t *ctx, const struct route *route)
109{
110 tal_t *this_ctx = tal(ctx, tal_t);
111 char *s = tal_strdup(ctx, "");
112 const size_t pathlen = tal_count(route->hops);
113 for (size_t i = 0; i < pathlen; i++) {
114 const struct short_channel_id_dir scidd =
115 hop_to_scidd(&route->hops[i]);
116 tal_append_fmt(&s, "%s%s", i ? "->" : "",
117 fmt_short_channel_id(this_ctx, scidd.scid));
118 }
119 tal_free(this_ctx);
120 return s;
121}

Callers 2

waitblockheight_doneFunction · 0.85
print_routesFunction · 0.85

Calls 4

hop_to_sciddFunction · 0.85
tal_append_fmtFunction · 0.85
fmt_short_channel_idFunction · 0.85
tal_freeFunction · 0.85

Tested by 1

print_routesFunction · 0.68