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

Function json_askrene_remove_layer

plugins/askrene/askrene.c:1453–1471  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1451}
1452
1453static struct command_result *json_askrene_remove_layer(struct command *cmd,
1454 const char *buffer,
1455 const jsmntok_t *params)
1456{
1457 struct layer *layer;
1458 struct json_stream *response;
1459
1460 if (!param(cmd, buffer, params,
1461 p_req("layer", param_known_layer, &layer),
1462 NULL))
1463 return command_param_failed();
1464 plugin_log(cmd->plugin, LOG_TRACE, "%s called: %.*s", __func__,
1465 json_tok_full_len(params), json_tok_full(buffer, params));
1466
1467 remove_layer(layer);
1468
1469 response = jsonrpc_stream_success(cmd);
1470 return command_finished(cmd, response);
1471}
1472
1473static struct command_result *json_askrene_listlayers(struct command *cmd,
1474 const char *buffer,

Callers

nothing calls this directly

Calls 8

remove_layerFunction · 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