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

Function json_dev_fail

lightningd/peer_control.c:4142–4158  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4140AUTODATA(json_command, &dev_sign_last_tx);
4141
4142static struct command_result *json_dev_fail(struct command *cmd,
4143 const char *buffer,
4144 const jsmntok_t *obj UNNEEDED,
4145 const jsmntok_t *params)
4146{
4147 struct channel *channel;
4148
4149 if (!param(cmd, buffer, params,
4150 p_req("id", param_dev_channel, &channel),
4151 NULL))
4152 return command_param_failed();
4153
4154 channel_fail_permanent(channel,
4155 REASON_USER,
4156 "Failing due to dev-fail command");
4157 return command_success(cmd, json_stream_success(cmd));
4158}
4159
4160static const struct json_command dev_fail_command = {
4161 "dev-fail",

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected