lightningd: switch parsing to common/configvar

Now we wire in the code which gathers configvars and parses from there;
lightningd keeps the array of configuration variables for future use.

Note that lightning-cli also needs to read the config, but it has its
own options (including short ones!) and doesn't want to use this
configvar mechanism, so we have a different API for that now.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2023-06-02 12:05:51 +09:30
parent f54e4f3084
commit edbaa944da
20 changed files with 312 additions and 320 deletions

View File

@@ -414,6 +414,8 @@ static bool print_extra_fields(const struct tlv_field *fields)
return ok;
}
bool deprecated_apis = true;
int main(int argc, char *argv[])
{
const tal_t *ctx = tal(NULL, char);
@@ -424,7 +426,6 @@ int main(int argc, char *argv[])
bool to_hex = false;
common_setup(argv[0]);
deprecated_apis = true;
opt_set_alloc(opt_allocfn, tal_reallocfn, tal_freefn);
opt_register_noarg("--help|-h", opt_usage_and_exit,