MCPcopy Create free account
hub / github.com/ElementsProject/lightning / post_check

Function post_check

common/json_param.c:81–97  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

79}
80
81static 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
99static struct command_result *parse_by_position(struct command *cmd,
100 struct param *params,

Callers 2

parse_by_positionFunction · 0.85
parse_by_nameFunction · 0.85

Calls 2

is_requiredFunction · 0.85
command_failFunction · 0.50

Tested by

no test coverage detected