libplugin: hand command, not plugin, to parsing functions.
What changed, and why it matters
This is a straightforward internal code cleanup in Core Lightning's plugin library. It changes many plugin option-parsing functions so they receive a 'command' object instead of a 'plugin' object. The commit message says this is preparation for future 'dynamic options' work (specifically for a bookkeeper currency feature). There is no bug fix, security patch, or vulnerability visible in the diff itself.
No security action required. Treat as normal refactoring. If reviewing the broader dynamic-options feature, verify that dynamic option handlers correctly enforce check_only semantics and do not mutate state during validity checks.
Security signals we found
No security-relevant signal in the diff: no bounds checks added, no input validation changes, no memory allocation hardening, no privilege changes, no cryptographic changes.
Commit message describes the change as architectural preparation for dynamic options, not a vulnerability fix.
Evidence from the diff
The patch refactors the libplugin option callback signature from char *(*handle)(struct plugin *, const char *, bool, void *) and bool (*jsonfmt)(struct plugin *, struct json_stream *, const char *, void *) to take struct command *cmd instead of struct plugin *plugin. All call sites and standard helpers (u64_option, u32_option, u16_option, bool_option, charp_option, flag_option and their jsonfmt counterparts) are updated. The only functional runtime change is that callbacks can now access cmd->plugin when they need the plugin pointer. The commit explicitly frames this as groundwork for dynamic options, not as a security fix.
Changed components
plugins/libplugin.cplugins/libplugin.hplugins/autoclean.cplugins/funder.cplugins/funder_policy.cplugins/funder_policy.hplugins/offers.cplugins/test/run-decode_guess_type.ctests/plugins/test_libplugin.cInspect captured patch +73 / −73
diff --git a/plugins/autoclean.c b/plugins/autoclean.c
index 70aa12f4..4ac88da3 100644
--- a/plugins/autoclean.c
+++ b/plugins/autoclean.c
@@ -826,30 +826,30 @@ static const char *init(struct command *init_cmd,
return NULL;
}
-static char *cycle_seconds_option(struct plugin *plugin, const char *arg,
+static char *cycle_seconds_option(struct command *cmd, const char *arg,
bool check_only,
u64 *cycle_seconds)
{
- char *problem = u64_option(plugin, arg, check_only, cycle_seconds);
+ char *problem = u64_option(cmd, arg, check_only, cycle_seconds);
if (problem || check_only)
return problem;
/* If timer is not running right now, reset it to new cycle_seconds */
if (cleantimer) {
tal_free(cleantimer);
- cleantimer = global_timer(plugin,
+ cleantimer = global_timer(cmd->plugin,
time_from_sec(*cycle_seconds),
do_clean_timer, NULL);
}
return NULL;
}
-static bool u64_jsonfmt_unless_zero(struct plugin *plugin,
+static bool u64_jsonfmt_unless_zero(struct command *cmd,
struct json_stream *js, const char *fieldname, u64 *i)
{
if (!*i)
return false;
- return u64_jsonfmt(plugin, js, fieldname, i);
+ return u64_jsonfmt(cmd, js, fieldname, i);
}
static const struct plugin_command commands[] = { {
diff --git a/plugins/funder.c b/plugins/funder.c
index 2843e598..6ce91b69 100644
--- a/plugins/funder.c
+++ b/plugins/funder.c
@@ -1245,7 +1245,7 @@ param_funder_opt(struct command *cmd, const char *name,
opt_str = tal_strndup(cmd, buffer + tok->start,
tok->end - tok->start);
- err = funding_option(cmd->plugin, opt_str, false, *opt);
+ err = funding_option(cmd, opt_str, false, *opt);
if (err)
return command_fail_badparam(cmd, name, buffer, tok, err);
@@ -1265,7 +1265,7 @@ param_policy_mod(struct command *cmd, const char *name,
arg_str = tal_strndup(cmd, buffer + tok->start,
tok->end - tok->start);
- err = u64_option(cmd->plugin, arg_str, false, *mod);
+ err = u64_option(cmd, arg_str, false, *mod);
if (err) {
tal_free(err);
if (!parse_amount_sat(&sats, arg_str, strlen(arg_str)))
@@ -1562,7 +1562,7 @@ const struct plugin_notification notifs[] = {
},
};
-static char *option_channel_base(struct plugin *plugin, const char *arg,
+static char *option_channel_base(struct command *cmd, const char *arg,
bool check_only, struct funder_policy *policy)
{
struct amount_msat amt;
@@ -1584,13 +1584,13 @@ static char *option_channel_base(struct plugin *plugin, const char *arg,
}
static char *
-option_channel_fee_proportional_thousandths_max(struct plugin *plugin,
+option_channel_fee_proportional_thousandths_max(struct command *cmd,
const char *arg,
bool check_only,
struct funder_policy *policy)
{
u16 fptm;
- char *problem = u16_option(plugin, arg, false, &fptm);
+ char *problem = u16_option(cmd, arg, false, &fptm);
if (problem || check_only)
return problem;
@@ -1601,7 +1601,7 @@ option_channel_fee_proportional_thousandths_max(struct plugin *plugin,
return NULL;
}
-static char *amount_option(struct plugin *plugin, const char *arg, bool check_only,
+static char *amount_option(struct command *cmd, const char *arg, bool check_only,
struct amount_sat *amt)
{
struct amount_sat v;
@@ -1613,7 +1613,7 @@ static char *amount_option(struct plugin *plugin, const char *arg, bool check_on
return NULL;
}
-static bool jsonfmt_amount_sat(struct plugin *plugin,
+static bool jsonfmt_amount_sat(struct command *cmd,
struct json_stream *js,
const char *fieldname,
struct amount_sat *sats)
@@ -1624,7 +1624,7 @@ static bool jsonfmt_amount_sat(struct plugin *plugin,
return true;
}
-static char *option_lease_fee_base(struct plugin *plugin, const char *arg,
+static char *option_lease_fee_base(struct command *cmd, const char *arg,
bool check_only,
struct funder_policy *policy)
{
@@ -1632,7 +1632,7 @@ static char *option_lease_fee_base(struct plugin *plugin, const char *arg,
u32 lfbs;
char *err;
- err = amount_option(plugin, arg, false, &amt);
+ err = amount_option(cmd, arg, false, &amt);
if (err)
return err;
@@ -1649,12 +1649,12 @@ static char *option_lease_fee_base(struct plugin *plugin, const char *arg,
return NULL;
}
-static char *option_lease_fee_basis(struct plugin *plugin, const char *arg,
+static char *option_lease_fee_basis(struct command *cmd, const char *arg,
bool check_only,
struct funder_policy *policy)
{
u16 lfb;
- char *problem = u16_option(plugin, arg, false, &lfb);
+ char *problem = u16_option(cmd, arg, false, &lfb);
if (problem || check_only)
return problem;
@@ -1665,12 +1665,12 @@ static char *option_lease_fee_basis(struct plugin *plugin, const char *arg,
return NULL;
}
-static char *option_lease_weight_max(struct plugin *plugin, const char *arg,
+static char *option_lease_weight_max(struct command *cmd, const char *arg,
bool check_only,
struct funder_policy *policy)
{
u16 fw;
- char *problem = u16_option(plugin, arg, false, &fw);
+ char *problem = u16_option(cmd, arg, false, &fw);
if (problem || check_only)
return problem;
@@ -1681,7 +1681,7 @@ static char *option_lease_weight_max(struct plugin *plugin, const char *arg,
return NULL;
}
-static char *amount_sat_or_u64_option(struct plugin *plugin,
+static char *amount_sat_or_u64_option(struct command *cmd,
const char *arg,
bool check_only,
u64 *amt)
@@ -1689,7 +1689,7 @@ static char *amount_sat_or_u64_option(struct plugin *plugin,
struct amount_sat sats;
char *err;
- err = u64_option(plugin, arg, false, &sats.satoshis); /* Raw: want sats below */
+ err = u64_option(cmd, arg, false, &sats.satoshis); /* Raw: want sats below */
if (err) {
tal_free(err);
if (!parse_amount_sat(&sats, arg, strlen(arg)))
@@ -1704,7 +1704,7 @@ static char *amount_sat_or_u64_option(struct plugin *plugin,
return NULL;
}
-static bool jsonfmt_policy_mod(struct plugin *plugin,
+static bool jsonfmt_policy_mod(struct command *cmd,
struct json_stream *js,
const char *fieldname,
u64 *amt)
diff --git a/plugins/funder_policy.c b/plugins/funder_policy.c
index fc84e8fc..baeca2b0 100644
--- a/plugins/funder_policy.c
+++ b/plugins/funder_policy.c
@@ -20,7 +20,7 @@ const char *funder_opt_name(enum funder_opt opt)
abort();
}
-char *funding_option(struct plugin *plugin, const char *arg, bool check_only, enum funder_opt *opt)
+char *funding_option(struct command *cmd, const char *arg, bool check_only, enum funder_opt *opt)
{
enum funder_opt v;
if (streq(arg, "match"))
@@ -39,7 +39,7 @@ char *funding_option(struct plugin *plugin, const char *arg, bool check_only, en
return NULL;
}
-bool jsonfmt_funding_option(struct plugin *plugin,
+bool jsonfmt_funding_option(struct command *cmd,
struct json_stream *js,
const char *fieldname,
enum funder_opt *opt)
diff --git a/plugins/funder_policy.h b/plugins/funder_policy.h
index 08cadfa9..3cd7709d 100644
--- a/plugins/funder_policy.h
+++ b/plugins/funder_policy.h
@@ -94,11 +94,11 @@ const char *funder_policy_desc(const tal_t *ctx,
const struct funder_policy *policy);
/* Convert a cmdline option to a funding_opt */
-char *funding_option(struct plugin *plugin, const char *arg, bool check_only,
+char *funding_option(struct command *cmd, const char *arg, bool check_only,
enum funder_opt *opt);
/* Convert to JSON field */
-bool jsonfmt_funding_option(struct plugin *plugin,
+bool jsonfmt_funding_option(struct command *cmd,
struct json_stream *js,
const char *fieldname,
enum funder_opt *opt);
diff --git a/plugins/libplugin.c b/plugins/libplugin.c
index c2ad2a2a..ac29e1d0 100644
--- a/plugins/libplugin.c
+++ b/plugins/libplugin.c
@@ -43,10 +43,10 @@ struct plugin_option {
const char *description;
/* Handle an option. If dynamic, check_only may be set to check
* for validity (but must not make any changes!) */
- char *(*handle)(struct plugin *plugin, const char *str, bool check_only,
+ char *(*handle)(struct command *cmd, const char *str, bool check_only,
void *arg);
/* Print an option (used to show the default value, if returns true) */
- bool (*jsonfmt)(struct plugin *plugin, struct json_stream *js, const char *fieldname,
+ bool (*jsonfmt)(struct command *cmd, struct json_stream *js, const char *fieldname,
void *arg);
/* Arg for handle and jsonfmt */
void *arg;
@@ -1276,7 +1276,7 @@ handle_getmanifest(struct command *getmanifest_cmd,
json_add_bool(params, "dynamic", p->opts[i].dynamic);
json_add_bool(params, "multi", p->opts[i].multi);
if (p->opts[i].jsonfmt)
- p->opts[i].jsonfmt(p, params, "default", p->opts[i].arg);
+ p->opts[i].jsonfmt(getmanifest_cmd, params, "default", p->opts[i].arg);
json_object_end(params);
}
json_array_end(params);
@@ -1574,12 +1574,12 @@ static struct command_result *handle_init(struct command *cmd,
size_t j;
const jsmntok_t *opt;
json_for_each_arr(j, opt, t+1) {
- problem = popt->handle(p, json_strdup(tmpctx, buf, opt), false, popt->arg);
+ problem = popt->handle(cmd, json_strdup(tmpctx, buf, opt), false, popt->arg);
if (problem)
plugin_err(p, "option '%s': %s", popt->name, problem);
}
} else {
- problem = popt->handle(p, json_strdup(tmpctx, buf, t+1), false, popt->arg);
+ problem = popt->handle(cmd, json_strdup(tmpctx, buf, t+1), false, popt->arg);
if (problem)
plugin_err(p, "option '%s': %s", popt->name, problem);
}
@@ -1611,7 +1611,7 @@ static struct command_result *handle_init(struct command *cmd,
return command_success(cmd, json_out_obj(cmd, NULL, NULL));
}
-char *u64_option(struct plugin *plugin, const char *arg, bool check_only, u64 *i)
+char *u64_option(struct command *cmd, const char *arg, bool check_only, u64 *i)
{
char *endp;
u64 v;
@@ -1628,10 +1628,10 @@ char *u64_option(struct plugin *plugin, const char *arg, bool check_only, u64 *i
return NULL;
}
-char *u32_option(struct plugin *plugin, const char *arg, bool check_only, u32 *i)
+char *u32_option(struct command *cmd, const char *arg, bool check_only, u32 *i)
{
u64 n;
- char *problem = u64_option(plugin, arg, false, &n);
+ char *problem = u64_option(cmd, arg, false, &n);
if (problem)
return problem;
@@ -1644,10 +1644,10 @@ char *u32_option(struct plugin *plugin, const char *arg, bool check_only, u32 *i
return NULL;
}
-char *u16_option(struct plugin *plugin, const char *arg, bool check_only, u16 *i)
+char *u16_option(struct command *cmd, const char *arg, bool check_only, u16 *i)
{
u64 n;
- char *problem = u64_option(plugin, arg, false, &n);
+ char *problem = u64_option(cmd, arg, false, &n);
if (problem)
return problem;
@@ -1660,7 +1660,7 @@ char *u16_option(struct plugin *plugin, const char *arg, bool check_only, u16 *i
return NULL;
}
-char *bool_option(struct plugin *plugin, const char *arg, bool check_only, bool *i)
+char *bool_option(struct command *cmd, const char *arg, bool check_only, bool *i)
{
if (!streq(arg, "true") && !streq(arg, "false"))
return tal_fmt(tmpctx, "'%s' is not a bool, must be \"true\" or \"false\"", arg);
@@ -1670,7 +1670,7 @@ char *bool_option(struct plugin *plugin, const char *arg, bool check_only, bool
return NULL;
}
-char *flag_option(struct plugin *plugin, const char *arg, bool check_only, bool *i)
+char *flag_option(struct command *cmd, const char *arg, bool check_only, bool *i)
{
/* We only get called if the flag was provided, so *i should be false
* by default */
@@ -1683,38 +1683,38 @@ char *flag_option(struct plugin *plugin, const char *arg, bool check_only, bool
return NULL;
}
-char *charp_option(struct plugin *plugin, const char *arg, bool check_only, char **p)
+char *charp_option(struct command *cmd, const char *arg, bool check_only, char **p)
{
if (!check_only)
*p = tal_strdup(NULL, arg);
return NULL;
}
-bool u64_jsonfmt(struct plugin *plugin, struct json_stream *js, const char *fieldname, u64 *i)
+bool u64_jsonfmt(struct command *cmd, struct json_stream *js, const char *fieldname, u64 *i)
{
json_add_u64(js, fieldname, *i);
return true;
}
-bool u32_jsonfmt(struct plugin *plugin, struct json_stream *js, const char *fieldname, u32 *i)
+bool u32_jsonfmt(struct command *cmd, struct json_stream *js, const char *fieldname, u32 *i)
{
json_add_u32(js, fieldname, *i);
return true;
}
-bool u16_jsonfmt(struct plugin *plugin, struct json_stream *js, const char *fieldname, u16 *i)
+bool u16_jsonfmt(struct command *cmd, struct json_stream *js, const char *fieldname, u16 *i)
{
json_add_u32(js, fieldname, *i);
return true;
}
-bool bool_jsonfmt(struct plugin *plugin, struct json_stream *js, const char *fieldname, bool *i)
+bool bool_jsonfmt(struct command *cmd, struct json_stream *js, const char *fieldname, bool *i)
{
json_add_bool(js, fieldname, *i);
return true;
}
-bool charp_jsonfmt(struct plugin *plugin, struct json_stream *js, const char *fieldname, char **p)
+bool charp_jsonfmt(struct command *cmd, struct json_stream *js, const char *fieldname, char **p)
{
if (!*p)
return false;
@@ -1722,12 +1722,12 @@ bool charp_jsonfmt(struct plugin *plugin, struct json_stream *js, const char *fi
return true;
}
-bool flag_jsonfmt(struct plugin *plugin, struct json_stream *js, const char *fieldname, bool *i)
+bool flag_jsonfmt(struct command *cmd, struct json_stream *js, const char *fieldname, bool *i)
{
/* Don't print if the default (false) */
if (!*i)
return false;
- return bool_jsonfmt(plugin, js, fieldname, i);
+ return bool_jsonfmt(cmd, js, fieldname, i);
}
static void setup_command_usage(struct plugin *p)
@@ -2226,7 +2226,7 @@ static void ld_command_handle(struct plugin *plugin,
else
val = "true";
- problem = popt->handle(plugin, val, check_only, popt->arg);
+ problem = popt->handle(cmd, val, check_only, popt->arg);
if (problem)
ret = command_fail(cmd, JSONRPC2_INVALID_PARAMS,
"%s", problem);
@@ -2397,8 +2397,8 @@ static struct plugin *new_plugin(const tal_t *ctx,
o.name = optname;
o.type = va_arg(ap, const char *);
o.description = va_arg(ap, const char *);
- o.handle = va_arg(ap, char *(*)(struct plugin *, const char *str, bool check_only, void *arg));
- o.jsonfmt = va_arg(ap, bool (*)(struct plugin *, struct json_stream *, const char *, void *arg));
+ o.handle = va_arg(ap, char *(*)(struct command *, const char *str, bool check_only, void *arg));
+ o.jsonfmt = va_arg(ap, bool (*)(struct command *, struct json_stream *, const char *, void *arg));
o.arg = va_arg(ap, void *);
o.dev_only = va_arg(ap, int); /* bool gets promoted! */
o.depr_start = va_arg(ap, const char *);
diff --git a/plugins/libplugin.h b/plugins/libplugin.h
index 5145041f..7c4e3a25 100644
--- a/plugins/libplugin.h
+++ b/plugins/libplugin.h
@@ -567,7 +567,7 @@ void plugin_notify_progress(struct command *cmd,
u32 num_progress, u32 progress);
/* Simply exists to check that `set` to plugin_option* is correct type */
-static inline void *plugin_option_cb_check(char *(*set)(struct plugin *plugin,
+static inline void *plugin_option_cb_check(char *(*set)(struct command *cmd,
const char *arg,
bool check_only,
void *))
@@ -576,7 +576,7 @@ static inline void *plugin_option_cb_check(char *(*set)(struct plugin *plugin,
}
/* Simply exists to check that `jsonfmt` to plugin_option* is correct type */
-static inline void *plugin_option_jsonfmt_check(bool (*jsonfmt)(struct plugin *,
+static inline void *plugin_option_jsonfmt_check(bool (*jsonfmt)(struct command *,
struct json_stream *,
const char *,
void *))
@@ -599,11 +599,11 @@ void *plugin_get_data_(struct plugin *plugin);
(description), \
plugin_option_cb_check(typesafe_cb_preargs(char *, void *, \
(set), (arg), \
- struct plugin *, \
+ struct command *, \
const char *, bool)),\
plugin_option_jsonfmt_check(typesafe_cb_preargs(bool, void *, \
(jsonfmt), (arg), \
- struct plugin *, \
+ struct command *, \
struct json_stream *, \
const char *)), \
(arg), \
@@ -633,26 +633,26 @@ void *plugin_get_data_(struct plugin *plugin);
plugin_option_((name), (type), (description), (set), (jsonfmt), (arg), false, NULL, NULL, false, true)
/* Standard helpers */
-char *u64_option(struct plugin *plugin, const char *arg, bool check_only, u64 *i);
-char *u32_option(struct plugin *plugin, const char *arg, bool check_only, u32 *i);
-char *u16_option(struct plugin *plugin, const char *arg, bool check_only, u16 *i);
-char *bool_option(struct plugin *plugin, const char *arg, bool check_only, bool *i);
-char *charp_option(struct plugin *plugin, const char *arg, bool check_only, char **p);
-char *flag_option(struct plugin *plugin, const char *arg, bool check_only, bool *i);
-
-bool u64_jsonfmt(struct plugin *plugin, struct json_stream *js, const char *fieldname,
+char *u64_option(struct command *cmd, const char *arg, bool check_only, u64 *i);
+char *u32_option(struct command *cmd, const char *arg, bool check_only, u32 *i);
+char *u16_option(struct command *cmd, const char *arg, bool check_only, u16 *i);
+char *bool_option(struct command *cmd, const char *arg, bool check_only, bool *i);
+char *charp_option(struct command *cmd, const char *arg, bool check_only, char **p);
+char *flag_option(struct command *cmd, const char *arg, bool check_only, bool *i);
+
+bool u64_jsonfmt(struct command *cmd, struct json_stream *js, const char *fieldname,
u64 *i);
-bool u32_jsonfmt(struct plugin *plugin, struct json_stream *js, const char *fieldname,
+bool u32_jsonfmt(struct command *cmd, struct json_stream *js, const char *fieldname,
u32 *i);
-bool u16_jsonfmt(struct plugin *plugin, struct json_stream *js, const char *fieldname,
+bool u16_jsonfmt(struct command *cmd, struct json_stream *js, const char *fieldname,
u16 *i);
-bool bool_jsonfmt(struct plugin *plugin, struct json_stream *js, const char *fieldname,
+bool bool_jsonfmt(struct command *cmd, struct json_stream *js, const char *fieldname,
bool *i);
-bool charp_jsonfmt(struct plugin *plugin, struct json_stream *js, const char *fieldname,
+bool charp_jsonfmt(struct command *cmd, struct json_stream *js, const char *fieldname,
char **p);
/* Usually equivalent to NULL, since flag must default to false be useful! */
-bool flag_jsonfmt(struct plugin *plugin, struct json_stream *js, const char *fieldname,
+bool flag_jsonfmt(struct command *cmd, struct json_stream *js, const char *fieldname,
bool *i);
/* The main plugin runner: append with 0 or more plugin_option(), then NULL. */
diff --git a/plugins/offers.c b/plugins/offers.c
index 4b10b381..0a9a82b2 100644
--- a/plugins/offers.c
+++ b/plugins/offers.c
@@ -1742,7 +1742,7 @@ static const struct plugin_command commands[] = {
},
};
-static char *scid_option(struct plugin *plugin, const char *arg, bool check_only,
+static char *scid_option(struct command *cmd, const char *arg, bool check_only,
struct short_channel_id **scidp)
{
struct short_channel_id scid;
@@ -1750,11 +1750,11 @@ static char *scid_option(struct plugin *plugin, const char *arg, bool check_only
if (!short_channel_id_from_str(arg, strlen(arg), &scid))
return tal_fmt(tmpctx, "'%s' is not an scid", arg);
- *scidp = notleak(tal_dup(plugin, struct short_channel_id, &scid));
+ *scidp = notleak(tal_dup(cmd->plugin, struct short_channel_id, &scid));
return NULL;
}
-static bool scid_jsonfmt(struct plugin *plugin, struct json_stream *js, const char *fieldname,
+static bool scid_jsonfmt(struct command *cmd, struct json_stream *js, const char *fieldname,
struct short_channel_id **scid)
{
if (!*scid)
diff --git a/plugins/test/run-decode_guess_type.c b/plugins/test/run-decode_guess_type.c
index 8b3782a7..abeca0e2 100644
--- a/plugins/test/run-decode_guess_type.c
+++ b/plugins/test/run-decode_guess_type.c
@@ -70,11 +70,11 @@ struct command_result *establish_onion_path_(struct command *cmd UNNEEDED,
void *arg UNNEEDED)
{ fprintf(stderr, "establish_onion_path_ called!\n"); abort(); }
/* Generated stub for flag_jsonfmt */
-bool flag_jsonfmt(struct plugin *plugin UNNEEDED, struct json_stream *js UNNEEDED, const char *fieldname UNNEEDED,
+bool flag_jsonfmt(struct command *cmd UNNEEDED, struct json_stream *js UNNEEDED, const char *fieldname UNNEEDED,
bool *i UNNEEDED)
{ fprintf(stderr, "flag_jsonfmt called!\n"); abort(); }
/* Generated stub for flag_option */
-char *flag_option(struct plugin *plugin UNNEEDED, const char *arg UNNEEDED, bool check_only UNNEEDED, bool *i UNNEEDED)
+char *flag_option(struct command *cmd UNNEEDED, const char *arg UNNEEDED, bool check_only UNNEEDED, bool *i UNNEEDED)
{ fprintf(stderr, "flag_option called!\n"); abort(); }
/* Generated stub for forward_error */
struct command_result *forward_error(struct command *cmd UNNEEDED,
diff --git a/tests/plugins/test_libplugin.c b/tests/plugins/test_libplugin.c
index c4f9a459..774e0424 100644
--- a/tests/plugins/test_libplugin.c
+++ b/tests/plugins/test_libplugin.c
@@ -256,7 +256,7 @@ static struct command_result *json_spamlistcommand(struct command *cmd,
}
-static char *set_dynamic(struct plugin *plugin,
+static char *set_dynamic(struct command *cmd,
const char *arg,
bool check_only,
u32 *dynamic_opt)
@@ -369,7 +369,7 @@ static const struct plugin_notification notifs[] = { {
}
};
-static char *set_multi_string_option(struct plugin *plugin,
+static char *set_multi_string_option(struct command *cmd,
const char *arg,
bool check_only,
const char ***arr)
@@ -379,7 +379,7 @@ static char *set_multi_string_option(struct plugin *plugin,
return NULL;
}
-static bool multi_string_jsonfmt(struct plugin *plugin, struct json_stream *js, const char *fieldname, const char ***arr)
+static bool multi_string_jsonfmt(struct command *cmd, struct json_stream *js, const char *fieldname, const char ***arr)
{
json_array_start(js, fieldname);
for (size_t i = 0; i < tal_count(*arr); i++)
Why this scored 11/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.