param: generalize check handling a little.
We want to extend it to plugins, and we want it to be allowed to be async for more power, so rather than not completing the cmd if we're checking, do it in command_check_done() and call it. This is cleaner than the special case we had before, and allows check to us all the normal jsonrpc mechanisms, especially async requests (which we'll need if we want to hand check requests to plugins!). Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -601,6 +601,11 @@ bool command_check_only(const struct command *cmd)
|
||||
return false;
|
||||
}
|
||||
|
||||
struct command_result *command_check_done(struct command *cmd)
|
||||
{
|
||||
abort();
|
||||
}
|
||||
|
||||
void command_set_usage(struct command *cmd, const char *usage TAKES)
|
||||
{
|
||||
usage = tal_strdup(NULL, usage);
|
||||
|
||||
Reference in New Issue
Block a user