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

Function json_notifications

lightningd/jsonrpc.c:1661–1677  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1659AUTODATA(json_command, &check_command);
1660
1661static struct command_result *json_notifications(struct command *cmd,
1662 const char *buffer,
1663 const jsmntok_t *obj UNNEEDED,
1664 const jsmntok_t *params)
1665{
1666 bool *enable;
1667
1668 if (!param(cmd, buffer, params,
1669 p_req("enable", param_bool, &enable),
1670 NULL))
1671 return command_param_failed();
1672
1673 /* Catch the case where they sent this command then hung up. */
1674 if (cmd->jcon)
1675 cmd->jcon->notifications_enabled = *enable;
1676 return command_success(cmd, json_stream_success(cmd));
1677}
1678
1679static const struct json_command notifications_command = {
1680 "notifications",

Callers

nothing calls this directly

Calls 4

command_param_failedFunction · 0.70
command_successFunction · 0.70
json_stream_successFunction · 0.70
paramFunction · 0.50

Tested by

no test coverage detected