| 3306 | AUTODATA(json_command, &dev_ignore_htlcs); |
| 3307 | |
| 3308 | static struct command_result *param_channel(struct command *cmd, |
| 3309 | const char *name, |
| 3310 | const char *buffer, |
| 3311 | const jsmntok_t *tok, |
| 3312 | struct channel **chan) |
| 3313 | { |
| 3314 | struct channel_id cid; |
| 3315 | struct short_channel_id scid; |
| 3316 | |
| 3317 | if (json_tok_channel_id(buffer, tok, &cid)) { |
| 3318 | *chan = channel_by_cid(cmd->ld, &cid); |
| 3319 | if (!*chan) |
| 3320 | return command_fail_badparam(cmd, name, buffer, tok, |
| 3321 | "unknown channel"); |
| 3322 | return NULL; |
| 3323 | } else if (json_to_short_channel_id(buffer, tok, &scid)) { |
| 3324 | *chan = any_channel_by_scid(cmd->ld, scid, true); |
| 3325 | if (!*chan) |
| 3326 | return command_fail_badparam(cmd, name, buffer, tok, |
| 3327 | "unknown channel"); |
| 3328 | return NULL; |
| 3329 | } |
| 3330 | return command_fail_badparam(cmd, name, buffer, tok, |
| 3331 | "must be channel id or short channel id"); |
| 3332 | } |
| 3333 | |
| 3334 | static struct command_result *json_listhtlcs(struct command *cmd, |
| 3335 | const char *buffer, |
nothing calls this directly
no test coverage detected