Skip to content

Conversation

@TheBlueMatt
Copy link
Collaborator

9f9a7a9 introduced some changes to channel state transitions but left one case where we'd leave a channel in an undefined phase (upon receiving a commitment_signed in the wrong state), which we fix here.

9f9a7a9 introduced some changes
to channel state transitions but left one case where we'd leave a
channel in an undefined phase (upon receiving a `commitment_signed`
in the wrong state), which we fix here.
@TheBlueMatt TheBlueMatt added this to the 0.2 milestone Feb 27, 2025
Copy link
Contributor

@dunxen dunxen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ugh. Sorry, I definitely messed this up after rebasing the phase refactor. :(

@TheBlueMatt
Copy link
Collaborator Author

Long PRs with many rebases and rounds of review introduce way too many bugs...

@dunxen
Copy link
Contributor

dunxen commented Feb 28, 2025

This LGTM, maybe @jkczyz could perhaps take a look and then merge as he also has context.

},
_ => {
self.phase = phase;
debug_assert!(!matches!(self.phase, ChannelPhase::Undefined));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, the debug_assert should have probably gone outside the match as is done in funding_signed. Guess it doesn't really matter since the other arms should be obviously correct.

@jkczyz jkczyz merged commit 4f68130 into lightningdevkit:main Feb 28, 2025
25 of 26 checks passed
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.

3 participants