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

Function json_peer_connected

tests/plugins/test_libplugin.c:75–94  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

73}
74
75static struct command_result *
76json_peer_connected(struct command *cmd,
77 const char *buf,
78 const jsmntok_t *params)
79{
80 const jsmntok_t *peertok, *idtok;
81 struct json_stream *response;
82
83 peertok = json_get_member(buf, params, "peer");
84 assert(peertok);
85 idtok = json_get_member(buf, peertok, "id");
86 assert(idtok);
87 plugin_log(cmd->plugin, LOG_INFORM, "%s peer_connected",
88 json_strdup(tmpctx, buf, idtok));
89
90 response = jsonrpc_stream_success(cmd);
91 json_add_string(response, "result", "continue");
92
93 return command_finished(cmd, response);
94}
95
96static struct command_result *json_connected(struct command *cmd,
97 const char *buf,

Callers

nothing calls this directly

Calls 6

json_get_memberFunction · 0.85
plugin_logFunction · 0.50
json_strdupFunction · 0.50
jsonrpc_stream_successFunction · 0.50
json_add_stringFunction · 0.50
command_finishedFunction · 0.50

Tested by

no test coverage detected