Remove redundant ChannelContext::channel_type#3678
Merged
wpaulino merged 3 commits intolightningdevkit:mainfrom Apr 2, 2025
Merged
Remove redundant ChannelContext::channel_type#3678wpaulino merged 3 commits intolightningdevkit:mainfrom
ChannelContext::channel_type#3678wpaulino merged 3 commits intolightningdevkit:mainfrom
Conversation
|
👋 Thanks for assigning @wpaulino as a reviewer! |
9b2a4a8 to
8509d0b
Compare
dunxen
reviewed
Mar 25, 2025
Contributor
dunxen
left a comment
There was a problem hiding this comment.
LGTM. Makes sense to have it under funding scope only.
8509d0b to
cb31af3
Compare
While channel_type_features won't change during splicing, they may change when migrating existing channels to taproot in the future.
cb31af3 to
6490e39
Compare
Contributor
Author
|
Rebased on main to avoid being blocked by #3651. |
FundingScope::get_channel_type can be used instead of ChannelContext::channel_type, which is redundant.
6490e39 to
b036a94
Compare
Contributor
Author
|
Pushed a fix for CI. |
dunxen
previously approved these changes
Mar 26, 2025
wpaulino
reviewed
Mar 26, 2025
Contributor
|
CI is sad |
When reading ChannelTransactionParameters, the channel_type_features defaults to only_static_remote_key. This is similarly the case for reading a channel. Instead of overriding the latter with the former, check that they are consistent. It doesn't appear that overriding was ever necessary.
54ebb06 to
1bb3b4d
Compare
wpaulino
approved these changes
Apr 1, 2025
dunxen
approved these changes
Apr 2, 2025
Contributor
|
Merging as CI failure seems unrelated: |
7 tasks
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.
A channel's type is duplicated in
ChannelContext::channel_typeandFundingScope, viaChannelTranscationParameters::channel_type_features. Remove the redundantChannelContext::channel_typeand useFundingScope::get_channel_typeinstead. While the type will be the same across allFundingScope's during splicing, this may not be the case in the future when migrating existing channels to taproot.Based on #3651.