2017-08-28 18:06:01 +02:00
|
|
|
#ifndef LIGHTNING_COMMON_CONFIGDIR_H
|
|
|
|
#define LIGHTNING_COMMON_CONFIGDIR_H
|
2016-01-21 21:11:48 +01:00
|
|
|
#include "config.h"
|
|
|
|
#include <ccan/tal/tal.h>
|
|
|
|
|
2017-12-13 21:00:24 +01:00
|
|
|
/* Helper for options which are tal() strings. */
|
|
|
|
char *opt_set_talstr(const char *arg, char **p);
|
|
|
|
|
2019-11-23 02:45:53 +01:00
|
|
|
/* Initial options setup */
|
|
|
|
void setup_option_allocators(void);
|
2019-07-25 07:35:36 +02:00
|
|
|
|
2019-11-23 02:45:53 +01:00
|
|
|
/* Parse minimal config options and files */
|
|
|
|
void initial_config_opts(const tal_t *ctx,
|
|
|
|
int argc, char *argv[],
|
|
|
|
char **config_filename,
|
|
|
|
char **config_dir,
|
|
|
|
char **rpc_filename);
|
|
|
|
|
2019-11-23 02:45:53 +01:00
|
|
|
/* If they specify --conf, we just read that.
|
|
|
|
* If they specify --lightning-dir, we just read <lightning_dir>/config.
|
|
|
|
* Otherwise, we read ../config (toplevel), and config (network-level) */
|
|
|
|
void parse_config_files(const char *config_filename,
|
|
|
|
const char *config_dir,
|
|
|
|
bool early);
|
2019-11-23 02:45:53 +01:00
|
|
|
|
|
|
|
/* For listconfigs to access. */
|
|
|
|
char *opt_ignore(const char *arg, void *unused);
|
|
|
|
char *opt_ignore_noarg(void *unused);
|
2016-01-21 21:11:48 +01:00
|
|
|
|
2017-08-28 18:06:01 +02:00
|
|
|
#endif /* LIGHTNING_COMMON_CONFIGDIR_H */
|