Drop one owner from a scriptpubkey watch; the watch itself goes away * once the last owner is removed. */
| 369 | /* Drop one owner from a scriptpubkey watch; the watch itself goes away |
| 370 | * once the last owner is removed. */ |
| 371 | struct command_result *json_bwatch_del_scriptpubkey(struct command *cmd, |
| 372 | const char *buffer, |
| 373 | const jsmntok_t *params) |
| 374 | { |
| 375 | struct bwatch *bwatch = bwatch_of(cmd->plugin); |
| 376 | const char *owner; |
| 377 | u8 *scriptpubkey; |
| 378 | |
| 379 | if (!param(cmd, buffer, params, |
| 380 | p_req("owner", param_string, &owner), |
| 381 | p_req("scriptpubkey", param_bin_from_hex, &scriptpubkey), |
| 382 | NULL)) |
| 383 | return command_param_failed(); |
| 384 | |
| 385 | bwatch_del_watch(cmd, bwatch, WATCH_SCRIPTPUBKEY, |
| 386 | NULL, scriptpubkey, NULL, NULL, owner); |
| 387 | return command_success(cmd, json_out_obj(cmd, "removed", "true")); |
| 388 | } |
| 389 | |
| 390 | /* Register an outpoint (txid + outnum) watch for `owner` from |
| 391 | * `start_block` onwards. */ |
nothing calls this directly
no test coverage detected