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

Function destroy_payment_request

plugins/xpay/xpay.c:351–364  ·  view source on GitHub ↗

Last request finished after xpay command is done gets to clean up */

Source from the content-addressed store, hash-verified

349
350/* Last request finished after xpay command is done gets to clean up */
351static void destroy_payment_request(struct out_req *req,
352 struct payment *payment)
353{
354 for (size_t i = 0; i < tal_count(payment->requests); i++) {
355 if (payment->requests[i] == req) {
356 tal_arr_remove(&payment->requests, i);
357 if (tal_count(payment->requests) == 0 && payment->cmd == NULL) {
358 cleanup(req->cmd, payment);
359 }
360 return;
361 }
362 }
363 abort();
364}
365
366static struct command_result *
367send_payment_req(struct command *aux_cmd,

Callers

nothing calls this directly

Calls 2

cleanupFunction · 0.85
abortFunction · 0.85

Tested by

no test coverage detected