LSPS2ServiceHandler API: Avoid explictly dropping locks#4124
LSPS2ServiceHandler API: Avoid explictly dropping locks#4124tnull merged 1 commit intolightningdevkit:mainfrom
LSPS2ServiceHandler API: Avoid explictly dropping locks#4124Conversation
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.
|
👋 Thanks for assigning @joostjager as a reviewer! |
Codecov Report❌ Patch coverage is
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
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
joostjager
left a comment
There was a problem hiding this comment.
Diff looks completely equivalent. Somewhat unsatisfying to not fully understand the root cause.
|
👋 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. |
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 thatcargowill run the same static analysis on dependencies, which has LDK Node builds fail with many dreaded 'isn'tSend' error whenever we touch the asyncLSPS2ServiceHandlerAPI.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.