| 425 | } |
| 426 | |
| 427 | static 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 | |
| 443 | static bool opt_show_alias(char *buf, size_t len, const struct lightningd *ld) |
| 444 | { |
nothing calls this directly
no test coverage detected