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

Function check_config

lightningd/options.c:1107–1126  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1105};
1106
1107static 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
1128static char *test_subdaemons_and_exit(struct lightningd *ld)
1129{

Callers 1

handle_optsFunction · 0.85

Calls 1

fatalFunction · 0.70

Tested by

no test coverage detected