Skip to content

Commit d7cf4c9

Browse files
committed
lightningd: remove clnrest override options.
Changelog-Removed: Config: autodetection for rest-port/rest-protocol/rest-host/rest-certs options to clnrest-* (deprecated v23.11, disabled v25.02). Signed-off-by: Rusty Russell <[email protected]>
1 parent 4359b73 commit d7cf4c9

File tree

2 files changed

+0
-44
lines changed

2 files changed

+0
-44
lines changed

doc/developers-guide/deprecations.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,6 @@ hidden: false
77

88
| Name | Type | First Deprecated | Last Supported | Description |
99
|--------------------------------------|--------------------|------------------|----------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
10-
| rest-port.clnrest-prefix | Config | v23.11 | v24.11 | Autodetect where we need to rename `rest-port` to `clnrest-port` (added in v23.11) |
11-
| rest-protocol.clnrest-prefix | Config | v23.11 | v24.11 | Autodetect where we need to rename `rest-protocol` to `clnrest-protocol` (added in v23.11) |
12-
| rest-host.clnrest-prefix | Config | v23.11 | v24.11 | Autodetect where we need to rename `rest-host` to `clnrest-host` (added in v23.11) |
13-
| rest-certs.clnrest-prefix | Config | v23.11 | v24.11 | Autodetect where we need to rename `rest-certs` to `clnrest-certs` (added in v23.11) |
1410
| commando-rune | Command | v23.08 | v25.02 | replaced with `lightning-createrune` |
1511
| commando-listrunes | Command | v23.08 | v25.02 | replaced with `lightning-showrunes` |
1612
| commando-blacklist | Command | v23.08 | v25.02 | replaced with `lightning-blacklistrune` |

lightningd/options.c

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1833,48 +1833,8 @@ void handle_early_opts(struct lightningd *ld, int argc, char *argv[])
18331833
logging_options_parsed(ld->log_book);
18341834
}
18351835

1836-
/* Free *str, set *str to copy with `cln` prepended */
1837-
static void prefix_cln(char **str STEALS)
1838-
{
1839-
char *newstr = tal_fmt(tal_parent(*str), "cln%s", *str);
1840-
tal_free(*str);
1841-
*str = newstr;
1842-
}
1843-
1844-
/* Due to a conflict between the widely-deployed clightning-rest plugin and
1845-
* our own clnrest plugin, and people wanting to run both, in v23.11 we
1846-
* renamed some options. This breaks perfectly working v23.08 deployments who
1847-
* don't care about clightning-rest, so we work around it here. */
1848-
static void fixup_clnrest_options(struct lightningd *ld)
1849-
{
1850-
for (size_t i = 0; i < tal_count(ld->configvars); i++) {
1851-
struct configvar *cv = ld->configvars[i];
1852-
1853-
/* These worked for v23.08 */
1854-
if (!strstarts(cv->configline, "rest-port=")
1855-
&& !strstarts(cv->configline, "rest-protocol=")
1856-
&& !strstarts(cv->configline, "rest-host=")
1857-
&& !strstarts(cv->configline, "rest-certs="))
1858-
continue;
1859-
/* Did some (plugin) claim it? */
1860-
if (opt_find_long(cv->configline, cast_const2(const char **, &cv->optarg)))
1861-
continue;
1862-
if (!opt_deprecated_ok(ld,
1863-
tal_strndup(tmpctx, cv->configline,
1864-
strcspn(cv->configline, "=")),
1865-
"clnrest-prefix",
1866-
"v23.11", "v24.11"))
1867-
continue;
1868-
log_unusual(ld->log, "Option %s deprecated in v23.11, renaming to cln%s",
1869-
cv->configline, cv->configline);
1870-
prefix_cln(&cv->configline);
1871-
}
1872-
}
1873-
18741836
void handle_opts(struct lightningd *ld)
18751837
{
1876-
fixup_clnrest_options(ld);
1877-
18781838
/* Now we know all the options, finish parsing and finish
18791839
* populating ld->configvars with cmdline. */
18801840
parse_configvars_final(ld->configvars, true, ld->developer);

0 commit comments

Comments
 (0)