mirror of
https://github.com/aljazceru/lightning.git
synced 2026-01-05 23:24:21 +01:00
hsmd: drop newdir logic.
Originally we were supposed to tell the HSM we had just created the directory, otherwise it wouldn't create a new seed. But we modified it to check if there was a seed file anyway: just move that logic into a branch of hsmd. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
committed by
Christian Decker
parent
666e1b320f
commit
2ecfbf46e3
@@ -289,12 +289,10 @@ static int io_poll_lightningd(struct pollfd *fds, nfds_t nfds, int timeout)
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
setup_locale();
|
||||
|
||||
struct lightningd *ld;
|
||||
bool newdir;
|
||||
u32 blockheight;
|
||||
|
||||
setup_locale();
|
||||
daemon_setup(argv[0], log_backtrace_print, log_backtrace_exit);
|
||||
ld = new_lightningd(NULL);
|
||||
|
||||
@@ -306,7 +304,7 @@ int main(int argc, char *argv[])
|
||||
register_opts(ld);
|
||||
|
||||
/* Handle options and config; move to .lightningd */
|
||||
newdir = handle_opts(ld, argc, argv);
|
||||
handle_opts(ld, argc, argv);
|
||||
|
||||
/* Ignore SIGPIPE: we look at our write return values*/
|
||||
signal(SIGPIPE, SIG_IGN);
|
||||
@@ -323,7 +321,7 @@ int main(int argc, char *argv[])
|
||||
io_poll_debug = io_poll_override(io_poll_lightningd);
|
||||
|
||||
/* Set up HSM. */
|
||||
hsm_init(ld, newdir);
|
||||
hsm_init(ld);
|
||||
|
||||
/* Now we know our ID, we can set our color/alias if not already. */
|
||||
setup_color_and_alias(ld);
|
||||
|
||||
Reference in New Issue
Block a user