lightningd: implement more show commands to reduce listconfigs special casing.

Note that this actually changes listconfigs output for three msat
fields, which were not changed with the great msat merge.  Since
listconfigs isn't actually used by grpc, and the values are always a
little vague, I simply changed this.

Changelog-Fixed: JSON-RPC: `listconfigs` `htlc-minimum-msat`, `htlc-maximum-msat` and `max-dust-htlc-exposure-msat` fields are now numbers, not strings.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2023-06-01 16:12:30 +09:30
parent 1bb462759d
commit f7df7eeb42
3 changed files with 44 additions and 37 deletions

View File

@@ -239,11 +239,6 @@ bool is_restricted_ignored(const void *fn)
|| fn == opt_restricted_forceconf_only;
}
bool is_restricted_print_if_nonnull(const void *fn)
{
return fn == opt_restricted_cmdline;
}
void setup_option_allocators(void)
{
/*~ These functions make ccan/opt use tal for allocations */
@@ -324,7 +319,9 @@ void initial_config_opts(const tal_t *ctx,
/* This is only ever valid on cmdline */
opt_register_early_arg("--conf=<file>",
opt_restricted_cmdline, NULL,
opt_restricted_cmdline,
/* This doesn't show if NULL! */
opt_show_charp,
config_filename,
"Specify configuration file");