| 3270 | } |
| 3271 | |
| 3272 | static struct command_result *json_dev_ignore_htlcs(struct command *cmd, |
| 3273 | const char *buffer, |
| 3274 | const jsmntok_t *obj UNNEEDED, |
| 3275 | const jsmntok_t *params) |
| 3276 | { |
| 3277 | struct node_id *peerid; |
| 3278 | struct peer *peer; |
| 3279 | bool *ignore; |
| 3280 | |
| 3281 | if (!param_check(cmd, buffer, params, |
| 3282 | p_req("id", param_node_id, &peerid), |
| 3283 | p_req("ignore", param_bool, &ignore), |
| 3284 | NULL)) |
| 3285 | return command_param_failed(); |
| 3286 | |
| 3287 | peer = peer_by_id(cmd->ld, peerid); |
| 3288 | if (!peer) { |
| 3289 | return command_fail(cmd, LIGHTNINGD, |
| 3290 | "Could not find channel with that peer"); |
| 3291 | } |
| 3292 | if (command_check_only(cmd)) |
| 3293 | return command_check_done(cmd); |
| 3294 | |
| 3295 | peer->dev_ignore_htlcs = *ignore; |
| 3296 | |
| 3297 | return command_success(cmd, json_stream_success(cmd)); |
| 3298 | } |
| 3299 | |
| 3300 | static const struct json_command dev_ignore_htlcs = { |
| 3301 | "dev-ignore-htlcs", |
nothing calls this directly
no test coverage detected