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

Function json_disconnect

plugins/funder.c:734–758  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

732}
733
734static struct command_result *json_disconnect(struct command *cmd,
735 const char *buf,
736 const jsmntok_t *params)
737{
738 struct node_id id;
739 const char *err;
740
741 err = json_scan(tmpctx, buf, params,
742 "{id:%}",
743 JSON_SCAN(json_to_node_id, &id));
744 if (err)
745 plugin_err(cmd->plugin,
746 "`disconnect` notification payload did not"
747 " scan %s: %.*s",
748 err, json_tok_full_len(params),
749 json_tok_full(buf, params));
750
751 plugin_log(cmd->plugin, LOG_DBG,
752 "Cleaning up inflights for peer id %s",
753 type_to_string(tmpctx, struct node_id, &id));
754
755 cleanup_peer_pending_opens(&id);
756
757 return notification_handled(cmd);
758}
759
760static struct command_result *json_channel_open_failed(struct command *cmd,
761 const char *buf,

Callers

nothing calls this directly

Calls 8

notification_handledFunction · 0.85
plugin_errFunction · 0.70
plugin_logFunction · 0.70
json_scanFunction · 0.50
json_tok_full_lenFunction · 0.50
json_tok_fullFunction · 0.50
type_to_stringClass · 0.50

Tested by

no test coverage detected