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

Function json_askrene_disable_node

plugins/askrene/askrene.c:1320–1342  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1318}
1319
1320static struct command_result *json_askrene_disable_node(struct command *cmd,
1321 const char *buffer,
1322 const jsmntok_t *params)
1323{
1324 struct node_id *node;
1325 struct layer *layer;
1326 struct json_stream *response;
1327
1328 if (!param(cmd, buffer, params,
1329 p_req("layer", param_known_layer, &layer),
1330 p_req("node", param_node_id, &node),
1331 NULL))
1332 return command_param_failed();
1333 plugin_log(cmd->plugin, LOG_TRACE, "%s called: %.*s", __func__,
1334 json_tok_full_len(params), json_tok_full(buffer, params));
1335
1336 /* We save this in the layer, because they want us to disable all the channels
1337 * to the node at *use* time (a new channel might be gossiped!). */
1338 layer_add_disabled_node(layer, node);
1339
1340 response = jsonrpc_stream_success(cmd);
1341 return command_finished(cmd, response);
1342}
1343
1344static struct command_result *json_askrene_create_layer(struct command *cmd,
1345 const char *buffer,

Callers

nothing calls this directly

Calls 8

layer_add_disabled_nodeFunction · 0.85
paramFunction · 0.50
command_param_failedFunction · 0.50
plugin_logFunction · 0.50
json_tok_full_lenFunction · 0.50
json_tok_fullFunction · 0.50
jsonrpc_stream_successFunction · 0.50
command_finishedFunction · 0.50

Tested by

no test coverage detected