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

Function check_config

lightningd/options.c:1111–1130  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 1

handle_optsFunction · 0.85

Calls 1

fatalFunction · 0.70

Tested by

no test coverage detected