bkpr: account name is required for bkpr-inspect

This commit is contained in:
niftynei 2022-07-19 17:04:39 +09:30 committed by Rusty Russell
parent 563910e667
commit 3dcfd2d0e4
1 changed files with 1 additions and 5 deletions

View File

@ -230,14 +230,10 @@ static struct command_result *json_inspect(struct command *cmd,
/* Only available for channel accounts? */
if (!param(cmd, buf, params,
p_opt("account", param_string, &acct_name),
p_req("account", param_string, &acct_name),
NULL))
return command_param_failed();
if (!acct_name)
return command_fail(cmd, PLUGIN_ERROR,
"Account not provided");
if (streq(acct_name, WALLET_ACCT)
|| streq(acct_name, EXTERNAL_ACCT))
return command_fail(cmd, PLUGIN_ERROR,