| 465 | } |
| 466 | |
| 467 | void invoice_try_pay(struct lightningd *ld, |
| 468 | struct htlc_set *set, |
| 469 | const struct invoice_details *details) |
| 470 | { |
| 471 | struct invoice_payment_hook_payload *payload; |
| 472 | |
| 473 | payload = tal(NULL, struct invoice_payment_hook_payload); |
| 474 | payload->ld = ld; |
| 475 | payload->label = tal_steal(payload, details->label); |
| 476 | payload->msat = set->so_far; |
| 477 | payload->preimage = details->r; |
| 478 | payload->set = set; |
| 479 | tal_add_destructor2(set, invoice_payload_remove_set, payload); |
| 480 | |
| 481 | plugin_hook_call_invoice_payment(ld, NULL, payload); |
| 482 | } |
| 483 | |
| 484 | static bool hsm_sign_b11(const u5 *u5bytes, |
| 485 | const u8 *hrpu8, |