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

Avoid persisting on same counterparty's ChannelUpdate #2617

Merged

Conversation

wpaulino
Copy link
Contributor

Some nodes may rebroadcast their ChannelUpdate to their counterparty on every connection establishment, which leads to us doing an additional persist most of the time when nothing has changed. Now, we'll only persist if we receive an update that changes anything.

Fixes #2616.

@wpaulino wpaulino added this to the 0.0.117 milestone Sep 28, 2023
@wpaulino wpaulino force-pushed the no-persist-same-channel-update branch from 00da3fc to 1ea4843 Compare September 28, 2023 23:11
TheBlueMatt
TheBlueMatt previously approved these changes Sep 28, 2023
lightning/src/ln/channel.rs Outdated Show resolved Hide resolved
@codecov-commenter
Copy link

codecov-commenter commented Sep 29, 2023

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (082a19b) 89.00% compared to head (c8c5354) 88.97%.
Report is 8 commits behind head on main.

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

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2617      +/-   ##
==========================================
- Coverage   89.00%   88.97%   -0.04%     
==========================================
  Files         112      112              
  Lines       86273    86355      +82     
  Branches    86273    86355      +82     
==========================================
+ Hits        76791    76837      +46     
- Misses       7248     7284      +36     
  Partials     2234     2234              
Files Coverage Δ
lightning/src/ln/channel.rs 88.33% <100.00%> (+<0.01%) ⬆️
lightning/src/ln/channelmanager.rs 81.62% <75.00%> (+0.02%) ⬆️

... and 12 files with indirect coverage changes

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

Some nodes may rebroadcast their `ChannelUpdate` to their counterparty
on every connection establishment, which leads to us doing an additional
persist most of the time when nothing has changed. Now, we'll only
persist if we receive an update that changes anything.
@TheBlueMatt TheBlueMatt merged commit 5e871a7 into lightningdevkit:main Sep 29, 2023
@wpaulino wpaulino deleted the no-persist-same-channel-update branch September 29, 2023 17:40
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.

Don't persist ChannelManager if we get a channel_update for our own channel with unchanged data
5 participants