From 3e866c6cc5392cd125cb0f7a922b28fe3005c5b6 Mon Sep 17 00:00:00 2001 From: Olaoluwa Osuntokun Date: Sun, 10 Mar 2019 16:39:31 -0700 Subject: [PATCH] lnwallet: add additional comment for case in ProcessChanSyncMsg --- lnwallet/channel.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lnwallet/channel.go b/lnwallet/channel.go index e0864023..e53ef9c5 100644 --- a/lnwallet/channel.go +++ b/lnwallet/channel.go @@ -3496,9 +3496,9 @@ func (lc *LightningChannel) ProcessChanSyncMsg( // is valid. var commitPoint *btcec.PublicKey switch { - case msg.NextLocalCommitHeight == remoteTailHeight+2: - commitPoint = lc.channelState.RemoteNextRevocation - + // If their height is one beyond what we know their current height to + // be, then we need to compare their current unrevoked commitment point + // as that's what they should send. case msg.NextLocalCommitHeight == remoteTailHeight+1: commitPoint = lc.channelState.RemoteCurrentRevocation }