| 1105 | }; |
| 1106 | |
| 1107 | static void check_config(struct lightningd *ld) |
| 1108 | { |
| 1109 | /* BOLT #2: |
| 1110 | * |
| 1111 | * The receiving node MUST fail the channel if: |
| 1112 | *... |
| 1113 | * - `max_accepted_htlcs` is greater than 483. |
| 1114 | */ |
| 1115 | if (ld->config.max_concurrent_htlcs < 1 || ld->config.max_concurrent_htlcs > 483) |
| 1116 | fatal("--max-concurrent-htlcs value must be between 1 and 483 it is: %u", |
| 1117 | ld->config.max_concurrent_htlcs); |
| 1118 | if (ld->config.funding_confirms == 0) |
| 1119 | fatal("funding-confirms must be greater than zero"); |
| 1120 | |
| 1121 | if (ld->always_use_proxy && !ld->proxyaddr) |
| 1122 | fatal("--always-use-proxy needs --proxy"); |
| 1123 | |
| 1124 | if (ld->daemon_parent_fd != -1 && !ld->logfiles) |
| 1125 | fatal("--daemon needs --log-file"); |
| 1126 | } |
| 1127 | |
| 1128 | static char *test_subdaemons_and_exit(struct lightningd *ld) |
| 1129 | { |