lnwallet: add additional comment for case in ProcessChanSyncMsg

This commit is contained in:
Olaoluwa Osuntokun
2019-03-10 16:39:31 -07:00
parent 90d8a46ec6
commit 3e866c6cc5

View File

@@ -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
}