Drop one owner from an outpoint watch; the watch itself goes away * once the last owner is removed. */
| 417 | /* Drop one owner from an outpoint watch; the watch itself goes away |
| 418 | * once the last owner is removed. */ |
| 419 | struct command_result *json_bwatch_del_outpoint(struct command *cmd, |
| 420 | const char *buffer, |
| 421 | const jsmntok_t *params) |
| 422 | { |
| 423 | struct bwatch *bwatch = bwatch_of(cmd->plugin); |
| 424 | const char *owner; |
| 425 | struct bitcoin_outpoint *outpoint; |
| 426 | |
| 427 | if (!param(cmd, buffer, params, |
| 428 | p_req("owner", param_string, &owner), |
| 429 | p_req("outpoint", param_outpoint, &outpoint), |
| 430 | NULL)) |
| 431 | return command_param_failed(); |
| 432 | |
| 433 | bwatch_del_watch(cmd, bwatch, WATCH_OUTPOINT, |
| 434 | outpoint, NULL, NULL, NULL, owner); |
| 435 | return command_success(cmd, json_out_obj(cmd, "removed", "true")); |
| 436 | } |
| 437 | |
| 438 | /* Register a short_channel_id watch for `owner` from `start_block` |
| 439 | * onwards. The scid pins the watch to one specific (block, txindex, |
nothing calls this directly
no test coverage detected