Skip to content

Conversation

@wvanlint
Copy link
Contributor

HTLCs can be intercepted for multiple reasons unrelated to this handler:

  • Other HTLC interceptors might have generated intercept SCIDs.
  • The SCID of a closed channel might have fallen into the fake SCID namespace.

The LSPS2 handler needs to indicate whether the specific SCID was known to it, so other handlers can be called or the HTLC can be failed back.

Returning a boolean is an option as well.

This is a continuation of lightningdevkit/lightning-liquidity#138.

HTLCs can be intercepted for multiple reasons unrelated to this handler:
- Other HTLC interceptors might have generated intercept SCIDs.
- The SCID of a closed channel might have fallen into the fake SCID
  namespace.

The LSPS2 handler needs to indicate whether the specific SCID was known
to it, so other handlers can be called or the HTLC can be failed back.
@ldk-reviews-bot
Copy link

ldk-reviews-bot commented Oct 14, 2025

👋 Thanks for assigning @tnull 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.

@codecov
Copy link

codecov bot commented Oct 14, 2025

Codecov Report

❌ Patch coverage is 0% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 88.74%. Comparing base (b6607a7) to head (1d2b0ed).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
lightning-liquidity/src/lsps2/service.rs 0.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4160      +/-   ##
==========================================
- Coverage   88.77%   88.74%   -0.04%     
==========================================
  Files         180      180              
  Lines      136622   136624       +2     
  Branches   136622   136624       +2     
==========================================
- Hits       121293   121252      -41     
- Misses      12517    12559      +42     
- Partials     2812     2813       +1     
Flag Coverage Δ
fuzzing 20.99% <0.00%> (-0.01%) ⬇️
tests 88.59% <0.00%> (-0.04%) ⬇️

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.

Copy link
Contributor

@valentinewallace valentinewallace left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM but would like @martinsaposnic or @tnull to have a look since I haven't reviewed lightning-liquidity code

@ldk-reviews-bot
Copy link

👋 The first review has been submitted!

Do you think this PR is ready for a second reviewer? If so, click here to assign a second reviewer.

@tnull tnull self-requested a review October 15, 2025 16:10
Copy link
Contributor

@martinsaposnic martinsaposnic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 1d2b0ed

Copy link
Contributor

@tnull tnull left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense, but I still think we need to do a better job allowing to discern different error variants. Now mentioned this in #4074 and tagged the latter 0.3.

@tnull tnull merged commit ec6d9a7 into lightningdevkit:main Oct 16, 2025
25 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.

5 participants