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

Function json_peer_connected

tests/plugins/test_libplugin.c:32–51  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

30}
31
32static struct command_result *
33json_peer_connected(struct command *cmd,
34 const char *buf,
35 const jsmntok_t *params)
36{
37 const jsmntok_t *peertok, *idtok;
38 struct json_stream *response;
39
40 peertok = json_get_member(buf, params, "peer");
41 assert(peertok);
42 idtok = json_get_member(buf, peertok, "id");
43 assert(idtok);
44 plugin_log(cmd->plugin, LOG_INFORM, "%s peer_connected",
45 json_strdup(tmpctx, buf, idtok));
46
47 response = jsonrpc_stream_success(cmd);
48 json_add_string(response, "result", "continue");
49
50 return command_finished(cmd, response);
51}
52
53static struct command_result *json_connected(struct command *cmd,
54 const char *buf,

Callers

nothing calls this directly

Calls 6

json_get_memberFunction · 0.50
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