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

Function tell_waiters_success

lightningd/pay.c:338–357  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

336}
337
338static void tell_waiters_success(struct lightningd *ld,
339 const struct sha256 *payment_hash,
340 struct wallet_payment *payment)
341{
342 struct waitsendpay_command *pc;
343 struct waitsendpay_command *next;
344
345 /* Careful: sendpay_success deletes cmd */
346 list_for_each_safe(&ld->waitsendpay_commands, pc, next, list) {
347 if (!sha256_eq(payment_hash, &pc->payment_hash))
348 continue;
349 if (payment->partid != pc->partid)
350 continue;
351 if (payment->groupid != pc->groupid)
352 continue;
353
354 pc->success(pc->cmd, payment, pc->arg);
355 }
356 notify_sendpay_success(ld, payment);
357}
358
359void payment_succeeded(struct lightningd *ld,
360 const struct sha256 *payment_hash,

Callers 1

payment_succeededFunction · 0.85

Calls 2

successMethod · 0.80
notify_sendpay_successFunction · 0.70

Tested by

no test coverage detected