Skip to content

Commit 7dbf3b7

Browse files
committed
lnwallet: only set initial key ring at commit height zero
1 parent 0746763 commit 7dbf3b7

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

lnwallet/channel.go

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8564,6 +8564,13 @@ func NewLocalForceCloseSummary(chanState *channeldb.OpenChannel,
85648564

85658565
// At this point, we'll check to see if we need any extra
85668566
// resolution data for this output.
8567+
var initialKeyRing *CommitmentKeyRing
8568+
if chanState.LocalCommitment.CommitHeight == 0 {
8569+
initialKeyRing = initialCommitmentKeyRingFromState(
8570+
chanState, lntypes.Local,
8571+
)
8572+
}
8573+
85678574
resolveBlob := fn.MapOptionZ(
85688575
auxResolver,
85698576
func(a AuxContractResolver) fn.Result[tlv.Blob] {
@@ -8582,9 +8589,7 @@ func NewLocalForceCloseSummary(chanState *channeldb.OpenChannel,
85828589
ContractPoint: commitResolution.SelfOutPoint,
85838590
SignDesc: commitResolution.SelfOutputSignDesc,
85848591
KeyRing: keyRing,
8585-
InitialKeyRing: initialCommitmentKeyRingFromState(
8586-
chanState, lntypes.Local,
8587-
),
8592+
InitialKeyRing: initialKeyRing,
85888593
CsvDelay: csvTimeout,
85898594
CommitFee: chanState.LocalCommitment.CommitFee,
85908595
})

0 commit comments

Comments
 (0)