feat: allow overriding route hints in BOLT11 invoice creation - #1
Merged
kaloudis merged 2 commits intoJul 27, 2026
Merged
Conversation
ajaysehwal
marked this pull request as ready for review
July 23, 2026 14:05
kaloudis
reviewed
Jul 25, 2026
kaloudis
left a comment
There was a problem hiding this comment.
Logic looks correct. The three states (None / Some(vec![]) / Some(hints)) are handled cleanly and default behavior is preserved. Note the CI failures are all pre-existing on the base branch (lsps7 rustfmt/clippy, runner issues); nothing flags this diff, and the stable builds pass.
Could you add test coverage for the three states? e.g. None -> auto hints unchanged, Some(vec![]) -> no private routes in the invoice, Some(custom) -> invoice contains exactly the provided hints.
ajaysehwal
force-pushed
the
feat/custom-routing-hints
branch
from
July 25, 2026 15:19
bb5ea58 to
2bd906e
Compare
kaloudis
approved these changes
Jul 27, 2026
kaloudis
merged commit Jul 27, 2026
a7fa715
into
ZeusLN:lsps7-for-ldk-node-close-fix
5 of 17 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
route_hints_overridetoBolt11InvoiceParameters, allowing callers ofChannelManager::create_bolt11_invoiceto control which route hints are embedded in a BOLT11 invoice.Today,
create_bolt11_invoicealways derives route hints automatically from local channels viasort_and_filter_channels. That works for the common case, but leaves no way to:This change adds an optional override while preserving existing default behavior.
Changes
route_hints_override: Option<Vec<RouteHint>>toBolt11InvoiceParameters.create_bolt11_invoiceto branch on the new field:None— existing behavior: select hints from eligible local channels viasort_and_filter_channels.Some(vec![])— include no route hints in the invoice.Some(hints)— use the provided hints as-is.RouteHintinchannelmanager.rs.API