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

Function json_dev_fail

lightningd/peer_control.c:3862–3878  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3860AUTODATA(json_command, &dev_sign_last_tx);
3861
3862static struct command_result *json_dev_fail(struct command *cmd,
3863 const char *buffer,
3864 const jsmntok_t *obj UNNEEDED,
3865 const jsmntok_t *params)
3866{
3867 struct channel *channel;
3868
3869 if (!param(cmd, buffer, params,
3870 p_req("id", param_dev_channel, &channel),
3871 NULL))
3872 return command_param_failed();
3873
3874 channel_fail_permanent(channel,
3875 REASON_USER,
3876 "Failing due to dev-fail command");
3877 return command_success(cmd, json_stream_success(cmd));
3878}
3879
3880static const struct json_command dev_fail_command = {
3881 "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