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

Function opt_set_rgb

lightningd/options.c:427–441  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

425}
426
427static char *opt_set_rgb(const char *arg, struct lightningd *ld)
428{
429 assert(arg != NULL);
430
431 ld->rgb = tal_free(ld->rgb);
432 /* BOLT #7:
433 *
434 * - Note: the first byte of `rgb_color` is the red value, the second
435 * byte is the green value, and the last byte is the blue value.
436 */
437 ld->rgb = tal_hexdata(ld, arg, strlen(arg));
438 if (!ld->rgb || tal_count(ld->rgb) != 3)
439 return tal_fmt(tmpctx, "rgb '%s' is not six hex digits", arg);
440 return NULL;
441}
442
443static bool opt_show_alias(char *buf, size_t len, const struct lightningd *ld)
444{

Callers

nothing calls this directly

Calls 2

tal_freeFunction · 0.85
tal_hexdataFunction · 0.85

Tested by

no test coverage detected