| 1318 | } |
| 1319 | |
| 1320 | static 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 | |
| 1344 | static struct command_result *json_askrene_create_layer(struct command *cmd, |
| 1345 | const char *buffer, |
nothing calls this directly
no test coverage detected