lightningd: change config-dir from plugin / wallet / hsm POV into <network> subdir

Changelog-changed: .lightningd plugins and files moved into <network>/ subdir
Changelog-changed: WARNING: If you don't have a config file, you now may need to specify the network to lightning-cli
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2019-11-23 12:16:40 +10:30
parent dc23c308e4
commit aab83e729b
20 changed files with 143 additions and 98 deletions

View File

@@ -15,6 +15,7 @@ int test_connect(int sockfd, const struct sockaddr *addr,
socklen_t addrlen);
int test_getpid(void);
int test_printf(const char *format, ...);
int test_chdir(const char *path);
#define main test_main
#define read test_read
@@ -22,6 +23,7 @@ int test_printf(const char *format, ...);
#define connect test_connect
#define getpid test_getpid
#define printf test_printf
#define chdir test_chdir
#include "../lightning-cli.c"
#undef main
@@ -79,6 +81,11 @@ int test_printf(const char *fmt UNUSED, ...)
return 0;
}
int test_chdir(const char *path)
{
return 0;
}
static char *response;
static size_t response_off, max_read_return;
@@ -140,5 +147,7 @@ int main(int argc UNUSED, char *argv[])
max_read_return = -1;
assert(test_main(3, fake_argv) == 0);
tal_free(response);
assert(!taken_any());
take_cleanup();
return 0;
}