lightningd: remove deprecated_apis global, put into lightningd.

We usually have access to `ld`, so avoid the global.

The only place generic code needs it is for the json command struct,
and that already has accessors: add one for libplugin and lightningd
to tell it if deprecated apis are OK.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2023-07-06 17:06:50 +09:30
parent db7c608e2d
commit 0c4426a349
28 changed files with 80 additions and 59 deletions

View File

@@ -500,6 +500,11 @@ bool command_usage_only(const struct command *cmd)
return cmd->usage_only;
}
bool command_deprecated_apis(const struct command *cmd)
{
return deprecated_apis;
}
/* FIXME: would be good to support this! */
bool command_check_only(const struct command *cmd)
{