| 1015 | } |
| 1016 | |
| 1017 | static 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 | |
| 1035 | static struct command_result *param_positive_msat_or_any(struct command *cmd, |
| 1036 | const char *name, |
no test coverage detected