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

Function do_edit_desc_payment

plugins/bkpr/bookkeeper.c:884–903  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

882};
883
884static struct command_result *do_edit_desc_payment(struct command *cmd,
885 struct edit_desc_payment_info *info)
886{
887 struct json_stream *res;
888 struct channel_event **channel_events;
889 struct chain_event **chain_events;
890 struct bkpr *bkpr = bkpr_of(cmd->plugin);
891
892 add_payment_hash_description(cmd, bkpr, info->identifier, info->new_desc);
893
894 chain_events = get_chain_events_by_id(cmd, bkpr, cmd, info->identifier);
895 channel_events = get_channel_events_by_id(cmd, bkpr, cmd, info->identifier);
896
897 res = jsonrpc_stream_success(cmd);
898 json_array_start(res, "updated");
899 json_add_events(res, bkpr, channel_events, chain_events, NULL);
900 json_array_end(res);
901
902 return command_finished(cmd, res);
903}
904
905static struct command_result *json_edit_desc_payment_id(struct command *cmd,
906 const char *buf,

Callers

nothing calls this directly

Calls 9

json_array_startFunction · 0.85
json_add_eventsFunction · 0.85
json_array_endFunction · 0.85
bkpr_ofFunction · 0.70
get_chain_events_by_idFunction · 0.70
get_channel_events_by_idFunction · 0.70
jsonrpc_stream_successFunction · 0.50
command_finishedFunction · 0.50

Tested by

no test coverage detected