MCPcopy Create free account
hub / github.com/ElementsProject/lightning / json_bwatch_del_scid

Function json_bwatch_del_scid

plugins/bwatch/bwatch_interface.c:468–485  ·  view source on GitHub ↗

Drop one owner from a scid watch; the watch itself goes away once * the last owner is removed. */

Source from the content-addressed store, hash-verified

466/* Drop one owner from a scid watch; the watch itself goes away once
467 * the last owner is removed. */
468struct 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. */

Callers

nothing calls this directly

Calls 6

bwatch_ofFunction · 0.85
bwatch_del_watchFunction · 0.85
paramFunction · 0.50
command_param_failedFunction · 0.50
command_successFunction · 0.50
json_out_objFunction · 0.50

Tested by

no test coverage detected