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

Function json_dev_ignore_htlcs

lightningd/peer_htlcs.c:3272–3298  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3270}
3271
3272static struct command_result *json_dev_ignore_htlcs(struct command *cmd,
3273 const char *buffer,
3274 const jsmntok_t *obj UNNEEDED,
3275 const jsmntok_t *params)
3276{
3277 struct node_id *peerid;
3278 struct peer *peer;
3279 bool *ignore;
3280
3281 if (!param_check(cmd, buffer, params,
3282 p_req("id", param_node_id, &peerid),
3283 p_req("ignore", param_bool, &ignore),
3284 NULL))
3285 return command_param_failed();
3286
3287 peer = peer_by_id(cmd->ld, peerid);
3288 if (!peer) {
3289 return command_fail(cmd, LIGHTNINGD,
3290 "Could not find channel with that peer");
3291 }
3292 if (command_check_only(cmd))
3293 return command_check_done(cmd);
3294
3295 peer->dev_ignore_htlcs = *ignore;
3296
3297 return command_success(cmd, json_stream_success(cmd));
3298}
3299
3300static const struct json_command dev_ignore_htlcs = {
3301 "dev-ignore-htlcs",

Callers

nothing calls this directly

Calls 8

param_checkFunction · 0.85
peer_by_idFunction · 0.85
command_param_failedFunction · 0.70
command_failFunction · 0.70
command_check_onlyFunction · 0.70
command_check_doneFunction · 0.70
command_successFunction · 0.70
json_stream_successFunction · 0.70

Tested by

no test coverage detected