Ensure we wipe pending un-accepted channel requests on err/discon.#2501
Merged
tnull merged 3 commits intolightningdevkit:mainfrom Aug 17, 2023
Merged
Ensure we wipe pending un-accepted channel requests on err/discon.#2501tnull merged 3 commits intolightningdevkit:mainfrom
tnull merged 3 commits intolightningdevkit:mainfrom
Conversation
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 ReportPatch coverage:
❗ 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
☔ View full report in Codecov by Sentry. |
wpaulino
previously approved these changes
Aug 16, 2023
tnull
reviewed
Aug 16, 2023
Contributor
tnull
left a comment
There was a problem hiding this comment.
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
previously approved these changes
Aug 16, 2023
...and replace an assertion with a debug_assertion
dunxen
approved these changes
Aug 17, 2023
tnull
approved these changes
Aug 17, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.