diff --git a/lnwallet/channel.go b/lnwallet/channel.go index c0743ea0c..a8bde14ef 100644 --- a/lnwallet/channel.go +++ b/lnwallet/channel.go @@ -1929,13 +1929,6 @@ func NewBreachRetribution(chanState *channeldb.OpenChannel, stateNum uint64, }, HashType: txscript.SigHashAll, } - - // If this is a tweakless commitment, then we can safely blank - // out the SingleTweak value as it isn't needed. - tweaklessCommit := chanState.ChanType.IsTweakless() - if tweaklessCommit { - localSignDesc.SingleTweak = nil - } } // Similarly, if the remote balance exceeds the remote party's dust @@ -4807,13 +4800,6 @@ func NewUnilateralCloseSummary(chanState *channeldb.OpenChannel, signer input.Si }, MaturityDelay: 0, } - - // If this is a tweakless commitment, then we can safely blank - // out the SingleTweak value as it isn't needed. - tweaklessCommit := chanState.ChanType.IsTweakless() - if tweaklessCommit { - commitResolution.SelfOutputSignDesc.SingleTweak = nil - } } closeSummary := channeldb.ChannelCloseSummary{ diff --git a/lnwallet/commitment.go b/lnwallet/commitment.go index 99f577689..59f5f197b 100644 --- a/lnwallet/commitment.go +++ b/lnwallet/commitment.go @@ -146,6 +146,13 @@ func DeriveCommitmentKeys(commitPoint *btcec.PublicKey, // we'll use that directly, and ignore the commitPoint tweak. if tweaklessCommit { keyRing.ToRemoteKey = toRemoteBasePoint + + // If this is not our commitment, the above ToRemoteKey will be + // ours, and we blank out the local commitment tweak to + // indicate that the key should not be tweaked when signing. + if !isOurCommit { + keyRing.LocalCommitKeyTweak = nil + } } else { keyRing.ToRemoteKey = input.TweakPubKey( toRemoteBasePoint, commitPoint,