Skip to content

LSPS5 -> More follow ups #3987

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

Merged

Conversation

martinsaposnic
Copy link
Contributor

@martinsaposnic martinsaposnic commented Aug 4, 2025

Addressing LSPS5 follow ups, specifically these comments #3662 and #3662

This is finished but will mark this as draft because it depends on #3969. Once that's merged I will rebase this PR and undraft it.
Commits to review here are 27e5350 and 9d975ae
Done ✅

@ldk-reviews-bot
Copy link

ldk-reviews-bot commented Aug 4, 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.

@martinsaposnic martinsaposnic mentioned this pull request Aug 4, 2025
18 tasks
Copy link

codecov bot commented Aug 4, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.93%. Comparing base (7c5491d) to head (552d8e4).
⚠️ Report is 17 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3987      +/-   ##
==========================================
- Coverage   88.98%   88.93%   -0.06%     
==========================================
  Files         174      174              
  Lines      124222   124538     +316     
  Branches   124222   124538     +316     
==========================================
+ Hits       110543   110760     +217     
- Misses      11201    11283      +82     
- Partials     2478     2495      +17     
Flag Coverage Δ
fuzzing 22.18% <0.00%> (-0.05%) ⬇️
tests 88.76% <100.00%> (-0.06%) ⬇️

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

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

This needs a rebase.

@martinsaposnic martinsaposnic force-pushed the lsps5-and-more-follow-ups branch from 9d975ae to 669a065 Compare August 5, 2025 15:37
@martinsaposnic martinsaposnic marked this pull request as ready for review August 5, 2025 16:07
@martinsaposnic martinsaposnic force-pushed the lsps5-and-more-follow-ups branch from 669a065 to 681656f Compare August 5, 2025 16:09
@martinsaposnic martinsaposnic requested a review from tnull August 5, 2025 16:15
Copy link
Contributor

@tankyleo tankyleo left a comment

Choose a reason for hiding this comment

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

Looks like we can remove these clones here too for consistency ?

diff --git a/lightning-liquidity/src/lsps2/msgs.rs b/lightning-liquidity/src/lsps2/msgs.rs
index 84875d4ab..22a0d8116 100644
--- a/lightning-liquidity/src/lsps2/msgs.rs
+++ b/lightning-liquidity/src/lsps2/msgs.rs
@@ -72,7 +72,7 @@ impl LSPS2RawOpeningFeeParams {
                LSPS2OpeningFeeParams {
                        min_fee_msat: self.min_fee_msat,
                        proportional: self.proportional,
-                       valid_until: self.valid_until.clone(),
+                       valid_until: self.valid_until,
                        min_lifetime: self.min_lifetime,
                        max_client_to_self_delay: self.max_client_to_self_delay,
                        min_payment_size_msat: self.min_payment_size_msat,
@@ -235,7 +235,7 @@ mod tests {
                let raw = LSPS2RawOpeningFeeParams {
                        min_fee_msat,
                        proportional,
-                       valid_until: valid_until.clone().into(),
+                       valid_until,
                        min_lifetime,
                        max_client_to_self_delay,
                        min_payment_size_msat,

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.

LGTM, mod the pending comments.

@martinsaposnic martinsaposnic force-pushed the lsps5-and-more-follow-ups branch from 681656f to 552d8e4 Compare August 7, 2025 13:31
@martinsaposnic
Copy link
Contributor Author

thanks for the review @tankyleo !

I just force pushed this change:

diff --git a/lightning-liquidity/src/lsps2/msgs.rs b/lightning-liquidity/src/lsps2/msgs.rs
index 84875d4ab..8fb9536b6 100644
--- a/lightning-liquidity/src/lsps2/msgs.rs
+++ b/lightning-liquidity/src/lsps2/msgs.rs
@@ -72,7 +72,7 @@ impl LSPS2RawOpeningFeeParams {
 		LSPS2OpeningFeeParams {
 			min_fee_msat: self.min_fee_msat,
 			proportional: self.proportional,
-			valid_until: self.valid_until.clone(),
+			valid_until: self.valid_until,
 			min_lifetime: self.min_lifetime,
 			max_client_to_self_delay: self.max_client_to_self_delay,
 			min_payment_size_msat: self.min_payment_size_msat,
@@ -235,7 +235,7 @@ mod tests {
 		let raw = LSPS2RawOpeningFeeParams {
 			min_fee_msat,
 			proportional,
-			valid_until: valid_until.clone().into(),
+			valid_until: valid_until.into(),
 			min_lifetime,
 			max_client_to_self_delay,
 			min_payment_size_msat,

@martinsaposnic martinsaposnic requested a review from tnull August 7, 2025 13:32
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.

LGTM

Simple enough, landing this.

@tnull tnull merged commit c8450bf into lightningdevkit:main Aug 7, 2025
23 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.

4 participants