Skip to content

Commit d309a7d

Browse files
SimonVrouwerustyrussell
authored andcommitted
in ./lightningd --help, tell for which network the default values
are shown
1 parent 0a5dc71 commit d309a7d

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

lightningd/options.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -714,11 +714,16 @@ static char *test_daemons_and_exit(struct lightningd *ld)
714714
return NULL;
715715
}
716716

717-
static char *opt_lightningd_usage(struct lightningd *ld) {
717+
static char *opt_lightningd_usage(struct lightningd *ld)
718+
{
718719
/* Reload config so that --help has the correct network defaults
719720
* to display before it exits */
720721
setup_default_config(ld);
721-
opt_usage_and_exit("\nA bitcoin lightning daemon.");
722+
char *extra = tal_fmt(NULL, "\nA bitcoin lightning daemon (default "
723+
"values shown for network: %s).",
724+
get_chainparams(ld)->network_name);
725+
opt_usage_and_exit(extra);
726+
tal_free(extra);
722727
return NULL;
723728
}
724729

0 commit comments

Comments
 (0)