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

Function comp_req_order

common/json_param.c:198–204  ·  view source on GitHub ↗

This comparator is a bit different, but works well. * Return 0 if @a is optional and @b is required. Otherwise return 1. */

Source from the content-addressed store, hash-verified

196 * Return 0 if @a is optional and @b is required. Otherwise return 1.
197 */
198static int comp_req_order(const struct param *a, const struct param *b,
199 void *unused)
200{
201 if (!is_required(a->style) && is_required(b->style))
202 return 0;
203 return 1;
204}
205
206/*
207 * Make sure 2 sequential items in @params are not equal (based on

Callers

nothing calls this directly

Calls 1

is_requiredFunction · 0.85

Tested by

no test coverage detected