Skip to content

Conversation

@joostjager
Copy link
Contributor

Follows up to #4275

This commit is a pure move.
@ldk-reviews-bot
Copy link

ldk-reviews-bot commented Dec 12, 2025

👋 Thanks for assigning @TheBlueMatt 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 Dec 12, 2025

Codecov Report

❌ Patch coverage is 94.62366% with 10 lines in your changes missing coverage. Please review.
✅ Project coverage is 89.39%. Comparing base (593d6aa) to head (e50280c).
⚠️ Report is 7 commits behind head on main.

Files with missing lines Patch % Lines
lightning/src/ln/channelmanager.rs 94.62% 10 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4281      +/-   ##
==========================================
+ Coverage   89.37%   89.39%   +0.01%     
==========================================
  Files         180      180              
  Lines      139847   139834      -13     
  Branches   139847   139834      -13     
==========================================
+ Hits       124983   124998      +15     
+ Misses      12269    12250      -19     
+ Partials     2595     2586       -9     
Flag Coverage Δ
fuzzing 35.21% <75.80%> (-0.01%) ⬇️
tests 88.72% <94.62%> (+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.

/// [`ChannelManager::finish_close_channel`].
///
/// Returns a mapped error.
fn get_coop_close_err(
Copy link
Collaborator

Choose a reason for hiding this comment

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

Hmmmmm, its not really just a "getter", though. Even convert was maybe a bit of a misnomer, but its really doing a bunch of stuff - its doing the initial channel closure handling, at least the locked part. Maybe locked_handle_coop_close (and similarly rename the rest locked_handle_*_close)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's a good naming suggestion. Applied

/// When a channel is removed, two things need to happen:
/// (a) [`ChannelManager::convert_channel_err`] must be called in the same `per_peer_state` lock as the
/// channel-closing action,
/// (a) The close error must be converted to [`MsgHandleErrInternal`] in the same `per_peer_state` lock as the
Copy link
Collaborator

Choose a reason for hiding this comment

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

Depending on if we rename the other methods from convert this might also be confusing. But this also implies that you can just build the MsgHandleErrInternal rather than calling one of the 3 close-handle-convert methods, maybe just link all of them?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Linked all.

@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.

@joostjager joostjager force-pushed the remove-convert-channel-err-macro-follow-up branch 2 times, most recently from 39500b8 to 21a8400 Compare December 15, 2025 10:05
@joostjager joostjager force-pushed the remove-convert-channel-err-macro-follow-up branch from 21a8400 to e50280c Compare December 15, 2025 10:27
@TheBlueMatt TheBlueMatt merged commit 62c5849 into lightningdevkit:main Dec 15, 2025
20 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