Skip to content
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

[bugfix] lnwallet/channel: use FullySynced to check chanSync special case #1319

Merged

Conversation

halseth
Copy link
Contributor

@halseth halseth commented Jun 4, 2018

We check if the channel is FullySynced instead of comparing the local
and remote commit chain heights, as the heights might not be in sync.
Instead we call FullySynced which recently was modified to use compare
the message indexes instead, which is should really be in sync between
the chains.

The test TestChanSyncOweRevocationAndCommitForceTransition is altered to
ensure the two chains at different heights before the test is started, to
trigger the case that would previously fail to resend the commitment
signature.

@halseth halseth force-pushed the chain-height-resend-commitsig branch from 48704e6 to 5dcc599 Compare June 4, 2018 13:09
We check if the channel is FullySynced instead of comparing the local
and remote commit chain heights, as the heights might not be in sync.
Instead we call FullySynced which recently was modified to use compare
the message indexes instead, which is _should_ really be in sync between
the chains.

The test TestChanSyncOweRevocationAndCommitForceTransition is altered to
ensure the two chains at different heights before the test is started, to
trigger the case that would previously fail to resend the commitment
signature.
@halseth halseth force-pushed the chain-height-resend-commitsig branch from 5dcc599 to 07629e5 Compare June 4, 2018 13:10
Copy link
Member

@Roasbeef Roasbeef left a comment

Choose a reason for hiding this comment

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

Nice catch! This puts the logic in line with the set of recent changes to avoid creating an "empty" update.

LGTM ✨

@Roasbeef Roasbeef merged commit 3bc026a into lightningnetwork:master Jun 5, 2018
@halseth halseth deleted the chain-height-resend-commitsig branch July 10, 2018 10:32
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.

None yet

2 participants