Skip to content

Conversation

tnull
Copy link
Contributor

@tnull tnull commented Sep 25, 2025

Follow-up to #4059.

We previously added some explict drops to make sure to drop locks before persisting. While clippy warned us about them, they seemed perfectly functional. However, it weirdly seems that cargo will run the same static analysis on dependencies, which has LDK Node builds fail with many dreaded 'isn't Send' error whenever we touch the async LSPS2ServiceHandler API.

Here, we simply believe clippy that this is a bad idea and use scoping over explict drops to ensure we don't hold them anymore when persisting.

Best reviewed with git diff --ignore-all-space, which makes the diff trivial.

We previously added some explict `drop`s to make sure to drop locks
before persisting. While clippy warned us about them, they seemed
perfectly functional. However, it weirdly seems that `cargo` will run
the same static analysis on dependencies, which has LDK Node builds fail
with many dreaded 'isn't `Send`' error whenever we touch the async
`LSPS2ServiceHandler` API.

Here, we simply believe clippy that this is a bad idea and use scoping
over explict `drop`s to ensure we don't hold them anymore when
persisting.
@tnull tnull requested a review from TheBlueMatt September 25, 2025 08:56
@ldk-reviews-bot
Copy link

ldk-reviews-bot commented Sep 25, 2025

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

@tnull tnull added this to the 0.2 milestone Sep 25, 2025
Copy link

codecov bot commented Sep 25, 2025

Codecov Report

❌ Patch coverage is 81.69014% with 13 lines in your changes missing coverage. Please review.
✅ Project coverage is 88.53%. Comparing base (7926fb9) to head (acb584d).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
lightning-liquidity/src/lsps2/service.rs 81.69% 11 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4124      +/-   ##
==========================================
- Coverage   88.54%   88.53%   -0.01%     
==========================================
  Files         179      179              
  Lines      134333   134329       -4     
  Branches   134333   134329       -4     
==========================================
- Hits       118939   118928      -11     
- Misses      12634    12646      +12     
+ Partials     2760     2755       -5     
Flag Coverage Δ
fuzzing 21.79% <ø> (ø)
tests 88.37% <81.69%> (-0.01%) ⬇️

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.

@tnull tnull requested review from joostjager and removed request for TheBlueMatt September 25, 2025 09:07
Copy link
Contributor

@joostjager joostjager left a comment

Choose a reason for hiding this comment

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

Diff looks completely equivalent. Somewhat unsatisfying to not fully understand the root cause.

@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 merged commit d076584 into lightningdevkit:main Sep 25, 2025
24 of 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.

3 participants