Drop one owner from a blockdepth watch; the watch itself goes away * once the last owner is removed. */
| 512 | /* Drop one owner from a blockdepth watch; the watch itself goes away |
| 513 | * once the last owner is removed. */ |
| 514 | struct command_result *json_bwatch_del_blockdepth(struct command *cmd, |
| 515 | const char *buffer, |
| 516 | const jsmntok_t *params) |
| 517 | { |
| 518 | struct bwatch *bwatch = bwatch_of(cmd->plugin); |
| 519 | const char *owner; |
| 520 | u32 *start_block; |
| 521 | |
| 522 | if (!param(cmd, buffer, params, |
| 523 | p_req("owner", param_string, &owner), |
| 524 | p_req("start_block", param_u32, &start_block), |
| 525 | NULL)) |
| 526 | return command_param_failed(); |
| 527 | |
| 528 | bwatch_del_watch(cmd, bwatch, WATCH_BLOCKDEPTH, |
| 529 | NULL, NULL, NULL, start_block, owner); |
| 530 | return command_success(cmd, json_out_obj(cmd, "removed", "true")); |
| 531 | } |
| 532 | |
| 533 | /* Emit type / start_block / owners for one watch. */ |
| 534 | static void json_out_watch_common(struct json_out *jout, |
nothing calls this directly
no test coverage detected