| 65 | } |
| 66 | |
| 67 | static struct command_result *post_check(struct command *cmd, |
| 68 | struct param *params) |
| 69 | { |
| 70 | struct param *first = params; |
| 71 | struct param *last = first + tal_count(params); |
| 72 | |
| 73 | /* Make sure required params were provided. */ |
| 74 | while (first != last && is_required(first->style)) { |
| 75 | if (!first->is_set) { |
| 76 | return command_fail(cmd, JSONRPC2_INVALID_PARAMS, |
| 77 | "missing required parameter: %s", |
| 78 | first->name); |
| 79 | } |
| 80 | first++; |
| 81 | } |
| 82 | return NULL; |
| 83 | } |
| 84 | |
| 85 | static struct command_result *parse_by_position(struct command *cmd, |
| 86 | struct param *params, |
no test coverage detected