Last of all we destroy the private layer */
| 339 | |
| 340 | /* Last of all we destroy the private layer */ |
| 341 | static struct command_result *cleanup(struct command *aux_cmd, |
| 342 | struct payment *payment) |
| 343 | { |
| 344 | struct out_req *req; |
| 345 | |
| 346 | req = jsonrpc_request_start(aux_cmd, |
| 347 | "askrene-remove-layer", |
| 348 | cleanup_finished, |
| 349 | cleanup_finished, |
| 350 | payment); |
| 351 | json_add_string(req->js, "layer", payment->private_layer); |
| 352 | return send_outreq(req); |
| 353 | } |
| 354 | |
| 355 | /* Last request finished after xpay command is done gets to clean up */ |
| 356 | static void destroy_payment_request(struct out_req *req, |
no test coverage detected