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

Function check_config

lightningd/options.c:1120–1139  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1118};
1119
1120static void check_config(struct lightningd *ld)
1121{
1122 /* BOLT #2:
1123 *
1124 * The receiving node MUST fail the channel if:
1125 *...
1126 * - `max_accepted_htlcs` is greater than 483.
1127 */
1128 if (ld->config.max_concurrent_htlcs < 1 || ld->config.max_concurrent_htlcs > 483)
1129 fatal("--max-concurrent-htlcs value must be between 1 and 483 it is: %u",
1130 ld->config.max_concurrent_htlcs);
1131 if (ld->config.funding_confirms == 0)
1132 fatal("funding-confirms must be greater than zero");
1133
1134 if (ld->always_use_proxy && !ld->proxyaddr)
1135 fatal("--always-use-proxy needs --proxy");
1136
1137 if (ld->daemon_parent_fd != -1 && !ld->logfiles)
1138 fatal("--daemon needs --log-file");
1139}
1140
1141static char *test_subdaemons_and_exit(struct lightningd *ld)
1142{

Callers 1

handle_optsFunction · 0.85

Calls 1

fatalFunction · 0.70

Tested by

no test coverage detected