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

Function tell_waiters_success

lightningd/pay.c:311–330  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

309}
310
311static void tell_waiters_success(struct lightningd *ld,
312 const struct sha256 *payment_hash,
313 struct wallet_payment *payment)
314{
315 struct sendpay_command *pc;
316 struct sendpay_command *next;
317
318 /* Careful: sendpay_success deletes cmd */
319 list_for_each_safe(&ld->waitsendpay_commands, pc, next, list) {
320 if (!sha256_eq(payment_hash, &pc->payment_hash))
321 continue;
322 if (payment->partid != pc->partid)
323 continue;
324 if (payment->groupid != pc->groupid)
325 continue;
326
327 sendpay_success(pc->cmd, payment);
328 }
329 notify_sendpay_success(ld, payment);
330}
331
332void payment_succeeded(struct lightningd *ld, struct htlc_out *hout,
333 const struct preimage *rval)

Callers 1

payment_succeededFunction · 0.85

Calls 2

sendpay_successFunction · 0.85
notify_sendpay_successFunction · 0.70

Tested by

no test coverage detected