| 3204 | AUTODATA(json_command, &dev_ignore_htlcs); |
| 3205 | |
| 3206 | static struct command_result *param_channel(struct command *cmd, |
| 3207 | const char *name, |
| 3208 | const char *buffer, |
| 3209 | const jsmntok_t *tok, |
| 3210 | struct channel **chan) |
| 3211 | { |
| 3212 | struct channel_id cid; |
| 3213 | struct short_channel_id scid; |
| 3214 | |
| 3215 | if (json_tok_channel_id(buffer, tok, &cid)) { |
| 3216 | *chan = channel_by_cid(cmd->ld, &cid); |
| 3217 | if (!*chan) |
| 3218 | return command_fail_badparam(cmd, name, buffer, tok, |
| 3219 | "unknown channel"); |
| 3220 | return NULL; |
| 3221 | } else if (json_to_short_channel_id(buffer, tok, &scid)) { |
| 3222 | *chan = any_channel_by_scid(cmd->ld, scid, true); |
| 3223 | if (!*chan) |
| 3224 | return command_fail_badparam(cmd, name, buffer, tok, |
| 3225 | "unknown channel"); |
| 3226 | return NULL; |
| 3227 | } |
| 3228 | return command_fail_badparam(cmd, name, buffer, tok, |
| 3229 | "must be channel id or short channel id"); |
| 3230 | } |
| 3231 | |
| 3232 | static struct command_result *json_listhtlcs(struct command *cmd, |
| 3233 | const char *buffer, |
nothing calls this directly
no test coverage detected