feature: if a bit is unset, then all other features that dep it should be #6007
Closed
Roasbeef wants to merge 2 commits intolightningnetwork:masterfrom
Closed
feature: if a bit is unset, then all other features that dep it should be #6007Roasbeef wants to merge 2 commits intolightningnetwork:masterfrom
Roasbeef wants to merge 2 commits intolightningnetwork:masterfrom
Conversation
…d be This fixes an issue where if one tries to unset a feature like anchors, and other feature depend on it, then `lnd` fails to start as it realizes that its dependnacy set is inconsistent. Fixes lightningnetwork#6002
Roasbeef
commented
Nov 20, 2021
| raw.Unset(lnwire.AnchorsZeroFeeHtlcTxOptional) | ||
| raw.Unset(lnwire.AnchorsZeroFeeHtlcTxRequired) | ||
|
|
||
| // If anchors are disabled, then we also need to |
Member
Author
There was a problem hiding this comment.
Hmm, seems we could convert all other instances above to use logic like this as well, particularly the notlvonion part of it.
positiveblue
approved these changes
Nov 23, 2021
| if test.cfg.NoStaticRemoteKey { | ||
| assertUnset(lnwire.StaticRemoteKeyOptional) | ||
| } | ||
| if test.cfg.NoAnchors { |
Contributor
There was a problem hiding this comment.
I double checked this and I think ScriptEnforcedLeaseRequired and ScriptEnforcedLeaseOptional are disabled by default, so this test passes even without your fix.
positiveblue
suggested changes
Nov 23, 2021
Contributor
positiveblue
left a comment
There was a problem hiding this comment.
The changes LGTM, only a small problem with the tests
| raw.Unset(lnwire.AnchorsZeroFeeHtlcTxOptional) | ||
| raw.Unset(lnwire.AnchorsZeroFeeHtlcTxRequired) | ||
|
|
||
| // If anchors are disabled, then we also need to |
Collaborator
|
Replaced by #6026. |
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.
This fixes an issue where if one tries to unset a feature like anchors,
and other feature depend on it, then
lndfails to start as it realizesthat its dependnacy set is inconsistent.
Fixes #6002