lightningd: move basic parameter parsing into common/configdir

lightning-cli is going to need to know what network we're on, so
it will need to parse the config files.  Move the code which does
the initial bootstrap parsing into common, as well as the config
file parsing core.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2019-11-23 12:15:53 +10:30
parent 5673607ebc
commit 8b1aa3ef8b
13 changed files with 357 additions and 324 deletions

View File

@@ -114,6 +114,7 @@ int main(int argc UNUSED, char *argv[])
output = tal_strdup(NULL, "");
assert(test_main(3, fake_argv) == 0);
assert(!taken_any());
assert(streq(output, "channels=\n"
"\n"
@@ -129,5 +130,6 @@ int main(int argc UNUSED, char *argv[])
"num_channels=1\n"
"num_connected=1\n"));
tal_free(output);
take_cleanup();
return 0;
}