lightningd: check command should return as much detail as possible.

If they're explicitly calling "check", don't obfuscate the result!

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2024-06-24 13:15:52 +09:30
parent 9fd29d35dd
commit cb4dd7489c
2 changed files with 7 additions and 1 deletions

View File

@@ -8,7 +8,7 @@ command_fail_badparam(struct command *cmd,
const jsmntok_t *tok,
const char *msg)
{
if (command_dev_apis(cmd)) {
if (command_dev_apis(cmd) || command_check_only(cmd)) {
return command_fail(cmd, JSONRPC2_INVALID_PARAMS,
"%s: %s: invalid token '%.*s'",
paramname, msg,