JSON-RPC: getmanifest passes allow-deprecated-apis flag.

This allows plugins to choose how to present things in getmanifest.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Added: plugins: `getmanifest` may now include "allow-deprecated-apis" boolean flag.
Changelog-Deprecated: plugins: `getmanifest` without any parameters; plugins should accept any parameters for future use.
This commit is contained in:
Rusty Russell
2020-08-06 09:57:48 +09:30
parent 930e294801
commit 151bc47583
3 changed files with 8 additions and 4 deletions

View File

@@ -1285,6 +1285,9 @@ const char *plugin_send_getmanifest(struct plugin *p)
p->stdin_conn = io_new_conn(p, stdin, plugin_stdin_conn_init, p);
req = jsonrpc_request_start(p, "getmanifest", p->log,
plugin_manifest_cb, p);
/* Adding allow-deprecated-apis is part of the deprecation cycle! */
if (!deprecated_apis)
json_add_bool(req->stream, "allow-deprecated-apis", deprecated_apis);
jsonrpc_request_end(req);
plugin_request_send(p, req);
p->plugin_state = AWAITING_GETMANIFEST_RESPONSE;