| 1382 | } |
| 1383 | |
| 1384 | static struct command_result *json_askrene_disable_node(struct command *cmd, |
| 1385 | const char *buffer, |
| 1386 | const jsmntok_t *params) |
| 1387 | { |
| 1388 | struct node_id *node; |
| 1389 | struct layer *layer; |
| 1390 | struct json_stream *response; |
| 1391 | |
| 1392 | if (!param(cmd, buffer, params, |
| 1393 | p_req("layer", param_known_layer, &layer), |
| 1394 | p_req("node", param_node_id, &node), |
| 1395 | NULL)) |
| 1396 | return command_param_failed(); |
| 1397 | plugin_log(cmd->plugin, LOG_TRACE, "%s called: %.*s", __func__, |
| 1398 | json_tok_full_len(params), json_tok_full(buffer, params)); |
| 1399 | |
| 1400 | /* We save this in the layer, because they want us to disable all the channels |
| 1401 | * to the node at *use* time (a new channel might be gossiped!). */ |
| 1402 | layer_add_disabled_node(layer, node); |
| 1403 | |
| 1404 | response = jsonrpc_stream_success(cmd); |
| 1405 | return command_finished(cmd, response); |
| 1406 | } |
| 1407 | |
| 1408 | static struct command_result *json_askrene_create_layer(struct command *cmd, |
| 1409 | const char *buffer, |
nothing calls this directly
no test coverage detected