Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add persistence test for htlc in the LocalRemoved state #3645

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

joostjager
Copy link
Contributor

@joostjager joostjager commented Mar 5, 2025

Increase coverage and prepare for attributable failures which are going to extend the update_fail_htlc message with an additional field that needs to be persisted as well (#3611)

Increase coverage and prepare for attributable failures which are going
to extend the update_fail_htlc message with an additional field that
needs to be persisted as well.
@ldk-reviews-bot
Copy link

ldk-reviews-bot commented Mar 5, 2025

I've assigned @valentinewallace 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.

Copy link

codecov bot commented Mar 5, 2025

Codecov Report

Attention: Patch coverage is 98.64865% with 1 line in your changes missing coverage. Please review.

Project coverage is 90.25%. Comparing base (eaeed77) to head (96b172e).
Report is 48 commits behind head on main.

Files with missing lines Patch % Lines
lightning/src/ln/channelmanager.rs 98.64% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3645      +/-   ##
==========================================
+ Coverage   89.16%   90.25%   +1.08%     
==========================================
  Files         152      155       +3     
  Lines      118791   127106    +8315     
  Branches   118791   127106    +8315     
==========================================
+ Hits       105921   114715    +8794     
+ Misses      10312     9940     -372     
+ Partials     2558     2451     -107     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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.

Looks good!

@@ -15306,6 +15306,80 @@ mod tests {
nodes[1].logger.assert_log_contains("lightning::ln::channelmanager", "Payment preimage didn't match payment hash", 1);
}

#[test]
fn test_htlc_localremoved_persistence() {
Copy link
Contributor

Choose a reason for hiding this comment

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

We're generally trying to avoid adding any tests in channelmanager.rs since it's already massive. Could we move this to reload_tests.rs or another test file?

@@ -15306,6 +15306,80 @@ mod tests {
nodes[1].logger.assert_log_contains("lightning::ln::channelmanager", "Payment preimage didn't match payment hash", 1);
}

#[test]
fn test_htlc_localremoved_persistence() {
Copy link
Contributor

Choose a reason for hiding this comment

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

Mind adding a comment with a high level summary of what the test is covering?

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

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