Skip to content

Fix final incorrect cltv #2639

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

vladimirfomene
Copy link
Contributor

Fixes #2513

@codecov-commenter
Copy link

codecov-commenter commented Oct 2, 2023

Codecov Report

All modified lines are covered by tests ✅

Comparison is base (989304e) 88.99% compared to head (12ee4b4) 88.96%.

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

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2639      +/-   ##
==========================================
- Coverage   88.99%   88.96%   -0.04%     
==========================================
  Files         112      112              
  Lines       87168    87191      +23     
  Branches    87168    87191      +23     
==========================================
- Hits        77575    77567       -8     
- Misses       7353     7384      +31     
  Partials     2240     2240              
Files Coverage Δ
lightning/src/ln/channelmanager.rs 81.51% <100.00%> (+0.06%) ⬆️

... and 8 files with indirect coverage changes

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

@vladimirfomene vladimirfomene force-pushed the fix-final-incorrect-cltv branch 4 times, most recently from 3325025 to 5036e21 Compare October 9, 2023 16:58
@wpaulino
Copy link
Contributor

You might need to push again, GitHub is stuck "processing updates" on the PR.

https://github.blog/changelog/2023-09-26-more-details-provided-when-a-pull-request-is-merged-indirectly-or-is-still-processing-updates/

@vladimirfomene vladimirfomene force-pushed the fix-final-incorrect-cltv branch from 0e91028 to 12ee4b4 Compare October 12, 2023 04:35
As noted in BOLT 4, we should be using the update_add_htlc's cltv_expiry,
not the CLTV expiry set by the sender in the onion for this comparison.
See here: https://github.com/lightning/bolts/blob/4dcc377209509b13cf89a4b91fde7d478f5b46d8/04-onion-routing.md?plain=1#L334
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.

Thank you for tackling this! 🫶

@valentinewallace valentinewallace merged commit ded9080 into lightningdevkit:main Oct 13, 2023
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.

Fix CLTV comparison for final_incorrect_cltv_expiry onion error
4 participants