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

Follow-ups to #2970 #3028

Merged
merged 4 commits into from Apr 29, 2024

Conversation

jkczyz
Copy link
Contributor

@jkczyz jkczyz commented Apr 26, 2024

Remove some unnecessary clones when handling HTLCs and unnecessary / problematic TLVs from InvoiceRequestFields.

@jkczyz jkczyz added this to the 0.0.123 milestone Apr 26, 2024
@TheBlueMatt TheBlueMatt mentioned this pull request Apr 29, 2024
@TheBlueMatt TheBlueMatt linked an issue Apr 29, 2024 that may be closed by this pull request
TheBlueMatt
TheBlueMatt previously approved these changes Apr 29, 2024
lightning/src/ln/channelmanager.rs Outdated Show resolved Hide resolved
PaymentContext is already stored in ClaimablePayment via PaymentPurpose,
so there is no need to repeat it in each ClaimableHTLC via OnionPayload.
This avoids cloning the PaymentContext each time an HTLC is received,
other than for the first HTLC for a payment.
Event::PaymentClaimable and Event::PaymentClaimed already contain the
paid amount, so there's no need to included the requested amount in
InvoiceRequestFields.
InvoiceRequestFeatures may contain a large, odd bit. Including this in
InvoiceRequestFields, which is in each BlindedPath of a Bolt12Invoice,
could cause the invoice's onion message to exceed the maximum size. The
features are already checked before sending an invoice.
@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 66.66667% with 8 lines in your changes are missing coverage. Please review.

Project coverage is 89.48%. Comparing base (2c0fcf2) to head (33b6162).
Report is 29 commits behind head on main.

Files Patch % Lines
lightning/src/ln/channelmanager.rs 64.70% 6 Missing ⚠️
lightning/src/offers/invoice_request.rs 71.42% 2 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3028      +/-   ##
==========================================
+ Coverage   89.13%   89.48%   +0.35%     
==========================================
  Files         118      118              
  Lines       97492    99913    +2421     
  Branches    97492    99913    +2421     
==========================================
+ Hits        86903    89411    +2508     
+ Misses       8349     8246     -103     
- Partials     2240     2256      +16     

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

@valentinewallace
Copy link
Contributor

CI is failing, though it seems unrelated.

@TheBlueMatt
Copy link
Collaborator

CI failures are some new warning on beta, not related.

@TheBlueMatt TheBlueMatt merged commit d00e550 into lightningdevkit:main Apr 29, 2024
11 of 16 checks passed
TheBlueMatt added a commit to TheBlueMatt/rust-lightning that referenced this pull request May 6, 2024
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.

Discuss/Do #2970 followups
4 participants