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

Function comp_req_order

common/json_param.c:209–215  ·  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

207 * Return 0 if @a is optional and @b is required. Otherwise return 1.
208 */
209static int comp_req_order(const struct param *a, const struct param *b,
210 void *unused)
211{
212 if (!is_required(a->style) && is_required(b->style))
213 return 0;
214 return 1;
215}
216
217/*
218 * 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