| 617 | */ |
| 618 | |
| 619 | static struct command_result *blindedhints_cb(struct payment *payment) |
| 620 | { |
| 621 | if (payment->payment_info.blinded_paths == NULL) |
| 622 | return payment_continue(payment); |
| 623 | |
| 624 | struct payment_info *pinfo = &payment->payment_info; |
| 625 | struct short_channel_id scid; |
| 626 | struct node_id src; |
| 627 | |
| 628 | for (size_t i = 0; i < tal_count(pinfo->blinded_paths); i++) { |
| 629 | const struct blinded_payinfo *payinfo = |
| 630 | pinfo->blinded_payinfos[i]; |
| 631 | const struct blinded_path *path = pinfo->blinded_paths[i]; |
| 632 | |
| 633 | scid.u64 = i; // a fake scid |
| 634 | node_id_from_pubkey(&src, &path->first_node_id.pubkey); |
| 635 | |
| 636 | add_hintchan(payment, &src, payment->routing_destination, |
| 637 | payinfo->cltv_expiry_delta, scid, |
| 638 | payinfo->fee_base_msat, |
| 639 | payinfo->fee_proportional_millionths, |
| 640 | &payinfo->htlc_minimum_msat, |
| 641 | &payinfo->htlc_maximum_msat); |
| 642 | } |
| 643 | return payment_continue(payment); |
| 644 | } |
| 645 | |
| 646 | REGISTER_PAYMENT_MODIFIER(blindedhints, blindedhints_cb); |
| 647 |
nothing calls this directly
no test coverage detected