| 175 | } |
| 176 | |
| 177 | static struct command_result *param_reserve_path(struct command *cmd, |
| 178 | const char *name, |
| 179 | const char *buffer, |
| 180 | const jsmntok_t *tok, |
| 181 | struct reserve_hop **path) |
| 182 | { |
| 183 | size_t i; |
| 184 | const jsmntok_t *t; |
| 185 | |
| 186 | if (tok->type != JSMN_ARRAY) |
| 187 | return command_fail_badparam(cmd, name, buffer, tok, "should be an array"); |
| 188 | |
| 189 | *path = tal_arr(cmd, struct reserve_hop, tok->size); |
| 190 | json_for_each_arr(i, t, tok) { |
| 191 | struct command_result *ret; |
| 192 | |
| 193 | ret = parse_reserve_hop(cmd, name, buffer, t, &(*path)[i]); |
| 194 | if (ret) |
| 195 | return ret; |
| 196 | } |
| 197 | return NULL; |
| 198 | } |
| 199 | |
| 200 | static fp16_t *get_capacities(const tal_t *ctx, |
| 201 | struct plugin *plugin, struct gossmap *gossmap) |
nothing calls this directly
no test coverage detected