common: enforce that msat fields are called "xxx_msat".

Now we've fixed them all, make sure no new ones slip in!

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2022-06-20 19:52:09 +09:30
parent fccb11a641
commit 01411d70be
4 changed files with 16 additions and 2 deletions

View File

@@ -1616,7 +1616,13 @@ static void add_config(struct lightningd *ld,
/* FIXME: We actually treat it as if they specified
* --plugin for each one, so ignore these */
} else if (opt->cb_arg == (void *)opt_set_msat) {
json_add_amount_msat_only(response, name0, ld->config.max_dust_htlc_exposure_msat);
/* We allow -msat not _msat here, unlike
* json_add_amount_msat_only */
assert(strends(name0, "-msat"));
json_add_string(response, name0,
fmt_amount_msat(tmpctx,
*(struct amount_msat *)
opt->u.carg));
#if EXPERIMENTAL_FEATURES
} else if (opt->cb_arg == (void *)opt_set_accept_extra_tlv_types) {
/* TODO Actually print the option */