| 79 | } |
| 80 | |
| 81 | static struct command_result *post_check(struct command *cmd, |
| 82 | struct param *params) |
| 83 | { |
| 84 | struct param *first = params; |
| 85 | struct param *last = first + tal_count(params); |
| 86 | |
| 87 | /* Make sure required params were provided. */ |
| 88 | while (first != last && is_required(first->style)) { |
| 89 | if (!first->is_set) { |
| 90 | return command_fail(cmd, JSONRPC2_INVALID_PARAMS, |
| 91 | "missing required parameter: %s", |
| 92 | first->name); |
| 93 | } |
| 94 | first++; |
| 95 | } |
| 96 | return NULL; |
| 97 | } |
| 98 | |
| 99 | static struct command_result *parse_by_position(struct command *cmd, |
| 100 | struct param *params, |
no test coverage detected