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

Function parse_implied_config_file

common/configdir.c:253–270  ·  view source on GitHub ↗

network is NULL for parsing top-level config file. */

Source from the content-addressed store, hash-verified

251
252/* network is NULL for parsing top-level config file. */
253static void parse_implied_config_file(const char *config_basedir,
254 const char *network,
255 bool early)
256{
257 const char *dir, *filename;
258
259 if (config_basedir)
260 dir = path_join(NULL, take(path_cwd(NULL)), config_basedir);
261 else
262 dir = default_base_configdir(NULL);
263
264 if (network)
265 dir = path_join(NULL, take(dir), network);
266
267 filename = path_join(NULL, take(dir), "config");
268 parse_include(filename, false, early, 0);
269 tal_free(filename);
270}
271
272/* If they specify --conf, we just read that.
273 * Otherwise we read <lightning-dir>/config then <lightning-dir>/<network>/config

Callers 2

parse_config_filesFunction · 0.85
initial_config_optsFunction · 0.85

Calls 5

path_joinFunction · 0.85
path_cwdFunction · 0.85
default_base_configdirFunction · 0.85
parse_includeFunction · 0.85
tal_freeFunction · 0.85

Tested by

no test coverage detected