| 877 | }; |
| 878 | |
| 879 | static void check_config(struct lightningd *ld) |
| 880 | { |
| 881 | /* BOLT #2: |
| 882 | * |
| 883 | * The receiving node MUST fail the channel if: |
| 884 | *... |
| 885 | * - `max_accepted_htlcs` is greater than 483. |
| 886 | */ |
| 887 | if (ld->config.max_concurrent_htlcs < 1 || ld->config.max_concurrent_htlcs > 483) |
| 888 | fatal("--max-concurrent-htlcs value must be between 1 and 483 it is: %u", |
| 889 | ld->config.max_concurrent_htlcs); |
| 890 | if (ld->config.anchor_confirms == 0) |
| 891 | fatal("anchor-confirms must be greater than zero"); |
| 892 | |
| 893 | if (ld->always_use_proxy && !ld->proxyaddr) |
| 894 | fatal("--always-use-proxy needs --proxy"); |
| 895 | |
| 896 | if (ld->daemon_parent_fd != -1 && !ld->logfiles) |
| 897 | fatal("--daemon needs --log-file"); |
| 898 | } |
| 899 | |
| 900 | static char *test_subdaemons_and_exit(struct lightningd *ld) |
| 901 | { |