Skip to content

Conversation

TheBlueMatt
Copy link
Collaborator

When paying a BOLT 12 invoice an amount greater than any one of
multiple blinded paths, we need to track how much is in-flight
across the paths when retrying. Here we do so, tracking blinded
path usage in a new field in InFlightHtlcs.

Fixes #2737

In the next commit we'll track blinded path in-flights in
`InFlightHtlcs` as well as unblinded hops, so here we convert
`InFlightHtlcs` to a named-field struct so that we can add more
fields to it with less confusion.
Its not clear why this needs to be serialized at all (it should
generally always be generated live when needed), but its
serialization isn't forward-compatible, so really needs to be
dropped so that we can add additional field(s) to `InFlightHtlcs`.
@ldk-reviews-bot
Copy link

ldk-reviews-bot commented Sep 15, 2025

I've assigned @tankyleo as a reviewer!
I'll wait for their review and will help manage the review process.
Once they submit their review, I'll check if a second reviewer would be helpful.

When paying a BOLT 12 invoice an amount greater than any one of
multiple blinded paths, we need to track how much is in-flight
across the paths when retrying. Here we do so, tracking blinded
path usage in a new field in `InFlightHtlcs`.

Fixes lightningdevkit#2737
Copy link

codecov bot commented Sep 15, 2025

Codecov Report

❌ Patch coverage is 96.18321% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 88.36%. Comparing base (5ae19b4) to head (4cbd556).

Files with missing lines Patch % Lines
lightning/src/routing/router.rs 97.56% 2 Missing and 1 partial ⚠️
lightning/src/routing/scoring.rs 75.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4072      +/-   ##
==========================================
+ Coverage   88.33%   88.36%   +0.02%     
==========================================
  Files         177      177              
  Lines      131896   132011     +115     
  Branches   131896   132011     +115     
==========================================
+ Hits       116512   116645     +133     
+ Misses      12728    12704      -24     
- Partials     2656     2662       +6     
Flag Coverage Δ
fuzzing 21.60% <0.00%> (-0.02%) ⬇️
tests 88.19% <96.18%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

make InFlightHtlc take into account blinded data
2 participants