Skip to content

Generalize find_route to take RouteParameters#32

Merged
amackillop merged 1 commit into
lsp-0.7.0_accept-underpaying-htlcs_with_timing_logsfrom
austin_mdk-865_modify-find-route
May 22, 2026
Merged

Generalize find_route to take RouteParameters#32
amackillop merged 1 commit into
lsp-0.7.0_accept-underpaying-htlcs_with_timing_logsfrom
austin_mdk-865_modify-find-route

Conversation

@amackillop
Copy link
Copy Markdown

The previous find_route(payee, amount_msat, params) signature built PaymentParameters::from_node_id internally, throwing away the private route hints carried in BOLT11 invoices and the blinded payment paths carried in BOLT12 invoices. The underlying router handles both shapes fine; the API was hiding them.

Callers now build RouteParameters themselves with the appropriate PaymentParameters::from_* constructor and pass it in. The node-wide RouteParametersConfig is no longer overlaid implicitly. Different destination shapes want different caps, and overlaying the clear- pubkey defaults onto invoice-derived params would clobber the hint and blinded-path data the new API is meant to preserve.

PaymentParameters and RouteParameters are re-exported from lightning::routing::router so callers do not pull in rust-lightning directly.

The previous find_route(payee, amount_msat, params) signature built
PaymentParameters::from_node_id internally, throwing away the private
route hints carried in BOLT11 invoices and the blinded payment paths
carried in BOLT12 invoices. The underlying router handles both shapes
fine; the API was hiding them.

Callers now build RouteParameters themselves with the appropriate
PaymentParameters::from_* constructor and pass it in. The node-wide
RouteParametersConfig is no longer overlaid implicitly. Different
destination shapes want different caps, and overlaying the clear-
pubkey defaults onto invoice-derived params would clobber the hint
and blinded-path data the new API is meant to preserve.

PaymentParameters and RouteParameters are re-exported from
lightning::routing::router so callers do not pull in rust-lightning
directly.
@amackillop amackillop requested a review from martinsaposnic May 22, 2026 13:18
@amackillop amackillop merged commit f13fcea into lsp-0.7.0_accept-underpaying-htlcs_with_timing_logs May 22, 2026
6 of 34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants