Skip to content

Commit e8f530d

Browse files
committed
Channel/CommitmentsModule: avoid hardcoding values
This code assumes that the person who broadcasted the commitment transaction is always the funder and the person who is trying to spend the broadcasted remote commitment is always the fundee. This passed geewallet CI tests because that's the only case we test in geewallet end-to-end tests.
1 parent f0a3778 commit e8f530d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/DotNetLightning.Core/Channel/CommitmentsModule.fs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -559,7 +559,7 @@ module RemoteForceClose =
559559
let remoteChannelPubKeys = commitments.RemoteParams.ChannelPubKeys
560560
let commitmentNumber =
561561
obscuredCommitmentNumber.Unobscure
562-
false
562+
commitments.LocalParams.IsFunder
563563
localChannelPubKeys.PaymentBasepoint
564564
remoteChannelPubKeys.PaymentBasepoint
565565
let perCommitmentSecretOpt =
@@ -643,7 +643,7 @@ module RemoteForceClose =
643643
let remoteChannelPubKeys = commitments.RemoteParams.ChannelPubKeys
644644
let commitmentNumber =
645645
obscuredCommitmentNumber.Unobscure
646-
true
646+
commitments.LocalParams.IsFunder
647647
localChannelPubKeys.PaymentBasepoint
648648
remoteChannelPubKeys.PaymentBasepoint
649649

0 commit comments

Comments
 (0)