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

Function destroy_payment_request

plugins/xpay/xpay.c:356–369  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

354
355/* Last request finished after xpay command is done gets to clean up */
356static void destroy_payment_request(struct out_req *req,
357 struct payment *payment)
358{
359 for (size_t i = 0; i < tal_count(payment->requests); i++) {
360 if (payment->requests[i] == req) {
361 tal_arr_remove(&payment->requests, i);
362 if (tal_count(payment->requests) == 0 && payment->cmd == NULL) {
363 cleanup(req->cmd, payment);
364 }
365 return;
366 }
367 }
368 abort();
369}
370
371static struct command_result *
372send_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