Drop one owner from a scid watch; the watch itself goes away once * the last owner is removed. */
| 466 | /* Drop one owner from a scid watch; the watch itself goes away once |
| 467 | * the last owner is removed. */ |
| 468 | struct command_result *json_bwatch_del_scid(struct command *cmd, |
| 469 | const char *buffer, |
| 470 | const jsmntok_t *params) |
| 471 | { |
| 472 | struct bwatch *bwatch = bwatch_of(cmd->plugin); |
| 473 | const char *owner; |
| 474 | struct short_channel_id *scid; |
| 475 | |
| 476 | if (!param(cmd, buffer, params, |
| 477 | p_req("owner", param_string, &owner), |
| 478 | p_req("scid", param_short_channel_id, &scid), |
| 479 | NULL)) |
| 480 | return command_param_failed(); |
| 481 | |
| 482 | bwatch_del_watch(cmd, bwatch, WATCH_SCID, |
| 483 | NULL, NULL, scid, NULL, owner); |
| 484 | return command_success(cmd, json_out_obj(cmd, "removed", "true")); |
| 485 | } |
| 486 | |
| 487 | /* Register a blockdepth watch for `owner` anchored at `start_block`. |
| 488 | * Each new block fires a watch_found with depth = tip - start_block + 1. */ |
nothing calls this directly
no test coverage detected