diff --git a/common/json_param.c b/common/json_param.c index f2f853585..d832db152 100644 --- a/common/json_param.c +++ b/common/json_param.c @@ -53,10 +53,9 @@ static void param_add(struct param **params, tal_arr_expand(params, last); } -/* FIXME: To support the deprecated p_req_dup_ok */ static bool is_required(enum param_style style) { - return style == PARAM_REQUIRED || style == PARAM_REQUIRED_ALLOW_DUPS; + return style == PARAM_REQUIRED; } static struct command_result *make_callback(struct command *cmd, @@ -176,8 +175,6 @@ static struct command_result *parse_by_name(struct command *cmd, struct command_result *res; if (p->is_set) { - if (p->style == PARAM_REQUIRED_ALLOW_DUPS) - continue; return command_fail(cmd, JSONRPC2_INVALID_PARAMS, "duplicate json names: %s", p->name); diff --git a/common/json_param.h b/common/json_param.h index 70262010a..1fc6cfc26 100644 --- a/common/json_param.h +++ b/common/json_param.h @@ -83,7 +83,6 @@ const char *param_subcommand(struct command *cmd, const char *buffer, enum param_style { PARAM_REQUIRED, - PARAM_REQUIRED_ALLOW_DUPS, PARAM_OPTIONAL, PARAM_OPTIONAL_WITH_DEFAULT, PARAM_OPTIONAL_DEV_WITH_DEFAULT, @@ -116,20 +115,6 @@ enum param_style { (const jsmntok_t *)NULL, \ (arg)) == (struct command_result *)NULL); }) -/* - * Add an required parameter, like p_req, but ignore duplicates. - */ -#define p_req_dup_ok(name, cbx, arg) \ - name"", \ - PARAM_REQUIRED_ALLOW_DUPS, \ - (param_cbx)(cbx), \ - ({ *arg = NULL; \ - (arg) + 0*sizeof((cbx)((struct command *)NULL, \ - (const char *)NULL, \ - (const char *)NULL, \ - (const jsmntok_t *)NULL, \ - (arg)) == (struct command_result *)NULL); }) - /* * Add an optional parameter. *arg is set to @def if it isn't found. */