common/json_filter: routine to turn "filter" JSON into a filter.

Since the "struct command" is different from plugins and lightningd, we
need an accessor for this to work (the plugin one is a dummy for now!).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2022-11-04 14:00:48 +10:30
parent 3c75770586
commit 508a170598
6 changed files with 84 additions and 0 deletions

View File

@@ -132,6 +132,12 @@ struct command_result *command_done(void)
return &complete;
}
/* Don't ask for _filter, we will crash! */
struct json_filter **command_filter_ptr(struct command *cmd)
{
return NULL;
}
static void ld_send(struct plugin *plugin, struct json_stream *stream)
{
struct jstream *jstr = tal(plugin, struct jstream);