Skip to content

Ensure we wipe pending un-accepted channel requests on err/discon. #2501

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
merged 3 commits into from
Aug 17, 2023

Conversation

TheBlueMatt
Copy link
Collaborator

Two trivial followups to #2428.

If we have a pending inbound un-accepted channel but receive an
error message for it from our peer, or our peer disconnects, we
should remove the pending entry, ensuring any attempts to accept
it fail.

If we have a pending inbound un-accepted channel but receive an
error message for it from our peer, or our peer disconnects, we
should remove the pending entry, ensuring any attempts to accept
it fail.
0184727 switched around the logic
for inbound channel construction to assign the outbound SCID alias
after constructing the `InboundV1Channel` object. Thus, the SCID
alias argument is now unused, and we remove it here.
@codecov-commenter
Copy link

codecov-commenter commented Aug 16, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.29% 🎉

Comparison is base (fe0f845) 90.38% compared to head (ef5a387) 90.68%.
Report is 7 commits behind head on main.

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2501      +/-   ##
==========================================
+ Coverage   90.38%   90.68%   +0.29%     
==========================================
  Files         106      106              
  Lines       56302    57903    +1601     
  Branches    56302    57903    +1601     
==========================================
+ Hits        50890    52507    +1617     
+ Misses       5412     5396      -16     
Files Changed Coverage Δ
lightning/src/ln/channel.rs 89.46% <100.00%> (ø)
lightning/src/ln/channelmanager.rs 85.52% <100.00%> (+<0.01%) ⬆️
lightning/src/ln/functional_tests.rs 98.14% <100.00%> (ø)

... and 10 files with indirect coverage changes

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

wpaulino
wpaulino previously approved these changes Aug 16, 2023
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.

The docs on ChannelContext::set_outbound_scid_alias state:

	/// Only allowed immediately after deserialization if get_outbound_scid_alias returns 0,
	/// indicating we were written by LDK prior to 0.0.106 which did not set outbound SCID aliases.

Seems this is kind of outdated now?

dunxen
dunxen previously approved these changes Aug 16, 2023
...and replace an assertion with a debug_assertion
@TheBlueMatt TheBlueMatt dismissed stale reviews from dunxen and wpaulino via ef5a387 August 17, 2023 03:36
@tnull tnull merged commit f609fcf into lightningdevkit:main Aug 17, 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.

5 participants