mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-24 01:24:26 +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
@@ -735,10 +735,8 @@ void setup_color_and_alias(struct lightningd *ld)
|
||||
}
|
||||
}
|
||||
|
||||
bool handle_opts(struct lightningd *ld, int argc, char *argv[])
|
||||
void handle_opts(struct lightningd *ld, int argc, char *argv[])
|
||||
{
|
||||
bool newdir = false;
|
||||
|
||||
/* Load defaults first, so that --help (in early options) has something
|
||||
* to display. The actual values loaded here, will be overwritten later
|
||||
* by opt_parse_from_config. */
|
||||
@@ -757,7 +755,6 @@ bool handle_opts(struct lightningd *ld, int argc, char *argv[])
|
||||
if (chdir(ld->config_dir) != 0)
|
||||
fatal("Could not change directory %s: %s",
|
||||
ld->config_dir, strerror(errno));
|
||||
newdir = true;
|
||||
}
|
||||
|
||||
/* Now look for config file */
|
||||
@@ -788,8 +785,6 @@ bool handle_opts(struct lightningd *ld, int argc, char *argv[])
|
||||
close(fd);
|
||||
}
|
||||
#endif
|
||||
|
||||
return newdir;
|
||||
}
|
||||
|
||||
/* FIXME: This is a hack! Expose somehow in ccan/opt.*/
|
||||
|
||||
Reference in New Issue
Block a user