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

Function json_bwatch_del_outpoint

plugins/bwatch/bwatch_interface.c:419–436  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

417/* Drop one owner from an outpoint watch; the watch itself goes away
418 * once the last owner is removed. */
419struct 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,

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