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

Function unpack_routes

lightningd/invoice.c:1017–1033  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1015}
1016
1017static struct route_info **unpack_routes(const tal_t *ctx,
1018 const char *buffer,
1019 const jsmntok_t *routestok)
1020{
1021 struct route_info **routes;
1022 const jsmntok_t *t;
1023 size_t i;
1024
1025 if (!routestok)
1026 return NULL;
1027
1028 routes = tal_arr(ctx, struct route_info *, routestok->size);
1029 json_for_each_arr(i, t, routestok)
1030 routes[i] = unpack_route(routes, buffer, t);
1031
1032 return routes;
1033}
1034
1035static struct command_result *param_positive_msat_or_any(struct command *cmd,
1036 const char *name,

Callers 1

json_invoiceFunction · 0.85

Calls 1

unpack_routeFunction · 0.85

Tested by

no test coverage detected