| 3010 | AUTODATA(json_command, &delforward_command); |
| 3011 | |
| 3012 | static struct command_result *param_channel(struct command *cmd, |
| 3013 | const char *name, |
| 3014 | const char *buffer, |
| 3015 | const jsmntok_t *tok, |
| 3016 | struct channel **chan) |
| 3017 | { |
| 3018 | struct channel_id cid; |
| 3019 | struct short_channel_id scid; |
| 3020 | |
| 3021 | if (json_tok_channel_id(buffer, tok, &cid)) { |
| 3022 | *chan = channel_by_cid(cmd->ld, &cid); |
| 3023 | if (!*chan) |
| 3024 | return command_fail_badparam(cmd, name, buffer, tok, |
| 3025 | "unknown channel"); |
| 3026 | return NULL; |
| 3027 | } else if (json_to_short_channel_id(buffer, tok, &scid)) { |
| 3028 | *chan = any_channel_by_scid(cmd->ld, &scid, true); |
| 3029 | if (!*chan) |
| 3030 | return command_fail_badparam(cmd, name, buffer, tok, |
| 3031 | "unknown channel"); |
| 3032 | return NULL; |
| 3033 | } |
| 3034 | return command_fail_badparam(cmd, name, buffer, tok, |
| 3035 | "must be channel id or short channel id"); |
| 3036 | } |
| 3037 | |
| 3038 | static struct command_result *json_listhtlcs(struct command *cmd, |
| 3039 | const char *buffer, |
nothing calls this directly
no test coverage detected