Skip to content

Commit d69499b

Browse files
committed
lightningd: no longer allow plugin flag options with non-false default values.
Signed-off-by: Rusty Russell <[email protected]> Changelog-Removed: default settings for flag options in plugins which aren't "false".
1 parent f95b542 commit d69499b

File tree

2 files changed

+4
-11
lines changed

2 files changed

+4
-11
lines changed

doc/developers-guide/deprecations.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ hidden: false
1111
| rest-protocol.clnrest-prefix | Config | v23.11 | v24.11 | Autodetect where we need to rename `rest-protocol` to `clnrest-protocol` (added in v23.11) |
1212
| rest-host.clnrest-prefix | Config | v23.11 | v24.11 | Autodetect where we need to rename `rest-host` to `clnrest-host` (added in v23.11) |
1313
| rest-certs.clnrest-prefix | Config | v23.11 | v24.11 | Autodetect where we need to rename `rest-certs` to `clnrest-certs` (added in v23.11) |
14-
| 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` |
1514
| plugin.nonumericids | Getmanifest Reply | v23.08 | v24.08 | Plugins must specify that they can accept non-numeric command ids (numeric ids are deprecated) |
1615
| listchannels.include_private | Field(s) | v24.02 | v24.08 | `listchannels` including private channels (now use listpeerchannels which gives far more detail) |
1716
| max-locktime-blocks | Config | v24.05 | v24.11 | --max-locktime-blocks is now set to 2016 in the BOLT 4 spec |

lightningd/plugin.c

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1072,7 +1072,6 @@ static const char *plugin_opt_add(struct plugin *plugin, const char *buffer,
10721072
const char *name, *err;
10731073
enum opt_type optflags = 0;
10741074
bool set;
1075-
struct lightningd *ld = plugin->plugins->ld;
10761075

10771076
nametok = json_get_member(buffer, opt, "name");
10781077
typetok = json_get_member(buffer, opt, "type");
@@ -1134,15 +1133,10 @@ static const char *plugin_opt_add(struct plugin *plugin, const char *buffer,
11341133
/* We used to allow (ignore) anything, now make sure it's 'false' */
11351134
if (!json_to_bool(buffer, defaulttok, &val)
11361135
|| val != false) {
1137-
if (!lightningd_deprecated_in_ok(ld, plugin->log,
1138-
ld->deprecated_ok,
1139-
"options.flag", "default-not-false",
1140-
"v23.08", "v24.08", NULL)) {
1141-
return tal_fmt(plugin, "%s type flag default must be 'false' not %.*s",
1142-
popt->name,
1143-
json_tok_full_len(defaulttok),
1144-
json_tok_full(buffer, defaulttok));
1145-
}
1136+
return tal_fmt(plugin, "%s type flag default must be 'false' not %.*s",
1137+
popt->name,
1138+
json_tok_full_len(defaulttok),
1139+
json_tok_full(buffer, defaulttok));
11461140
}
11471141
defaulttok = NULL;
11481142
}

0 commit comments

Comments
 (0)