From 733ce81bd4d115779450f87a8e2287af0c55574e Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Sat, 10 Sep 2022 11:32:31 +0930 Subject: [PATCH] plugins: require usage for plugin APIs. Changelog-Removed: JSON-RPC: plugins must supply `usage` parameter (deprecated v0.7) Signed-off-by: Rusty Russell --- lightningd/plugin.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lightningd/plugin.c b/lightningd/plugin.c index ea9fb5c75..5ac7abcb8 100644 --- a/lightningd/plugin.c +++ b/lightningd/plugin.c @@ -1205,11 +1205,9 @@ static const char *plugin_rpcmethod_add(struct plugin *plugin, cmd->verbose = cmd->description; if (usagetok) usage = json_strdup(tmpctx, buffer, usagetok); - else if (!deprecated_apis) { + else return tal_fmt(plugin, "\"usage\" not provided by plugin"); - } else - usage = "[params]"; if (deptok) { if (!json_to_bool(buffer, deptok, &cmd->deprecated))