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

Function set_dynamic

tests/plugins/test_libplugin.c:260–276  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

258
259
260static char *set_dynamic(struct command *cmd,
261 const char *arg,
262 bool check_only,
263 u32 *dynamic_opt)
264{
265 int val = atol(arg);
266
267 /* Whee, let's allow odd */
268 if (val % 2 == 0)
269 return "I don't like \"even\" numbers (valid JSON? Try {})!";
270
271 if (check_only)
272 return NULL;
273
274 *dynamic_opt = val;
275 return NULL;
276}
277
278static const char *init(struct command *init_cmd,
279 const char *buf UNUSED,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected