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

Function blindedhints_cb

plugins/renepay/mods.c:619–644  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

617 */
618
619static 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
646REGISTER_PAYMENT_MODIFIER(blindedhints, blindedhints_cb);
647

Callers

nothing calls this directly

Calls 3

node_id_from_pubkeyFunction · 0.85
add_hintchanFunction · 0.85
payment_continueFunction · 0.70

Tested by

no test coverage detected