Limit payment path length based on `payment_metadata`, custom TLVs, etc.
Currently the maximum payment path length is hardcoded in the router to 19. However, the presence of payment_metadata, custom TLVs, and/or blinded paths may mean that the actual limit is much shorter. Account for these extra onion fields when calculating and setting the maximum path length for use in pathfinding.
Closes #2201.
Codecov Report
Attention: Patch coverage is 97.88732% with 12 lines in your changes are missing coverage. Please review.
Project coverage is 89.85%. Comparing base (
da7a916) to head (3cc673b). Report is 4 commits behind head on main.
:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@ Coverage Diff @@
## main #3026 +/- ##
==========================================
+ Coverage 89.79% 89.85% +0.06%
==========================================
Files 116 117 +1
Lines 96466 97278 +812
Branches 96466 97278 +812
==========================================
+ Hits 86619 87413 +794
- Misses 7290 7314 +24
+ Partials 2557 2551 -6
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
I found some more edge cases around how get_route counts hops as part of a path, so feel free to hold off on review there.
Rebased to (hopefully) fix CI. This should be good for review.
Feedback should be addressed. Also this needs a rebase so let me know when I can do that.
Squashed with 1 new fixup.
Squashed.