| 357 | } |
| 358 | |
| 359 | void payment_succeeded(struct lightningd *ld, |
| 360 | const struct sha256 *payment_hash, |
| 361 | u64 partid, u64 groupid, |
| 362 | const struct preimage *rval) |
| 363 | { |
| 364 | struct wallet_payment *payment; |
| 365 | |
| 366 | wallet_payment_set_status(ld->wallet, payment_hash, |
| 367 | partid, groupid, |
| 368 | PAYMENT_COMPLETE, rval); |
| 369 | payment = wallet_payment_by_hash(tmpctx, ld->wallet, |
| 370 | payment_hash, |
| 371 | partid, groupid); |
| 372 | assert(payment); |
| 373 | |
| 374 | if (payment->local_invreq_id) |
| 375 | wallet_invoice_request_mark_used(ld->wallet->db, |
| 376 | payment->local_invreq_id); |
| 377 | tell_waiters_success(ld, payment_hash, payment); |
| 378 | } |
| 379 | |
| 380 | /* Return a struct routing_failure for an immediate failure |
| 381 | * (returned directly from send_htlc_out). The returned |
no test coverage detected