Skip to content

Commit

Permalink
lightningd: remove createrune restrictions as strings.
Browse files Browse the repository at this point in the history
Changelog-Removed: JSON-RPC: `createrune` restrictions as raw strings (use arrays) (deprecated v23.05, EOL 24.02).
Signed-off-by: Rusty Russell <[email protected]>
  • Loading branch information
rustyrussell committed Feb 20, 2024
1 parent ad74344 commit 8ff0288
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 16 deletions.
1 change: 0 additions & 1 deletion doc/developers-guide/deprecations.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ hidden: false
| ....0-or-1 | Config | v23.08 | v24.08 | Boolean options (in plugins only) used to accept `0` or `1` in place of `true` or `false` |
| options.flag.default-not-false | Getmanifest Reply | v23.08 | v24.08 | `flag` options with a default which is not `false` (would be meaningless, since user can only set it to `true` |
| plugin.nonumericids | Getmanifest Reply | v23.08 | v24.08 | Plugins must specify that they can accept non-numeric command ids (numeric ids are deprecated) |
| createrune.restrictions.string | Parameter | v23.05 | v24.02 | `restrictions` parameter must be an array of arrays, not an array of strings |
| listchannels.include_private | Field(s) | v24.02 | v24.08 | `listchannels` including private channels (now use listpeerchannels which gives far more detail) |
| estimatefees.dummy_null | Field | v23.05 | v24.05 | deprecated feerates are `null` (rather than missing) if fee estimate is not available |
| estimatefees.opening | Field | v23.05 | v24.05 | `opening` feerate (implementation-specific, use modern feerates) |
Expand Down
16 changes: 1 addition & 15 deletions lightningd/runes.c
Original file line number Diff line number Diff line change
Expand Up @@ -483,22 +483,8 @@ static struct rune_restr *rune_restr_from_json(struct command *cmd,
size_t i;
struct rune_restr *restr;

/* \| is not valid JSON, so they use \\|: undo it! */
if (tok->type == JSMN_STRING
&& command_deprecated_in_ok(cmd, "restrictions.string",
"v23.05", "v24.02")) {
const char *unescape;
struct json_escape *e = json_escape_string_(tmpctx,
buffer + tok->start,
tok->end - tok->start);
unescape = json_escape_unescape(tmpctx, e);
if (!unescape)
return NULL;
return rune_restr_from_string(ctx, unescape, strlen(unescape));
}

restr = tal(ctx, struct rune_restr);
/* FIXME: after deprecation removed, allow singletons again! */
/* FIXME: allow singletons again? */
if (tok->type != JSMN_ARRAY)
return NULL;

Expand Down

0 comments on commit 8ff0288

Please sign in to comment.