Skip to content

Commit 54ba5cf

Browse files
committed
lnwallet: only set initial key ring at commit height zero
1 parent a73e939 commit 54ba5cf

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
@@ -8453,6 +8453,13 @@ func NewLocalForceCloseSummary(chanState *channeldb.OpenChannel,
84538453

84548454
// At this point, we'll check to see if we need any extra
84558455
// resolution data for this output.
8456+
var initialKeyRing *CommitmentKeyRing
8457+
if chanState.LocalCommitment.CommitHeight == 0 {
8458+
initialKeyRing = initialCommitmentKeyRingFromState(
8459+
chanState, lntypes.Local,
8460+
)
8461+
}
8462+
84568463
resolveBlob := fn.MapOptionZ(
84578464
auxResolver,
84588465
func(a AuxContractResolver) fn.Result[tlv.Blob] {
@@ -8471,9 +8478,7 @@ func NewLocalForceCloseSummary(chanState *channeldb.OpenChannel,
84718478
ContractPoint: commitResolution.SelfOutPoint,
84728479
SignDesc: commitResolution.SelfOutputSignDesc,
84738480
KeyRing: keyRing,
8474-
InitialKeyRing: initialCommitmentKeyRingFromState(
8475-
chanState, lntypes.Local,
8476-
),
8481+
InitialKeyRing: initialKeyRing,
84778482
CsvDelay: csvTimeout,
84788483
CommitFee: chanState.LocalCommitment.CommitFee,
84798484
})

0 commit comments

Comments
 (0)