| 379 | }; |
| 380 | |
| 381 | static struct command_result * |
| 382 | param_algorithm(struct command *cmd, const char *name, const char *buffer, |
| 383 | const jsmntok_t *tok, enum algorithm **algo) |
| 384 | { |
| 385 | const char *algo_str = json_strdup(cmd, buffer, tok); |
| 386 | *algo = tal(cmd, enum algorithm); |
| 387 | if (streq(algo_str, "default")) |
| 388 | **algo = ALGO_DEFAULT; |
| 389 | else if (streq(algo_str, "single-path")) |
| 390 | **algo = ALGO_SINGLE_PATH; |
| 391 | else |
| 392 | return command_fail_badparam(cmd, name, buffer, tok, |
| 393 | "unknown algorithm"); |
| 394 | return NULL; |
| 395 | } |
| 396 | |
| 397 | struct getroutes_info { |
| 398 | /* We keep this around in askrene->waiting if we're busy */ |
nothing calls this directly
no test coverage detected