From 6c77950cc48771f140506aeab386f1a7eaf97017 Mon Sep 17 00:00:00 2001 From: Andrew Cann Date: Mon, 3 Aug 2020 18:02:54 +0800 Subject: [PATCH] Send correct commitment point in channel_reestablish messages The commitment points we send in the `channel_reestablish` messages is wrong. We need to send our commitment point for the peer's most recent commitment, not theirs. This commit fixes the issue. --- src/DotNetLightning.Core/Channel/Channel.fs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/DotNetLightning.Core/Channel/Channel.fs b/src/DotNetLightning.Core/Channel/Channel.fs index d6d36282f..607d36316 100644 --- a/src/DotNetLightning.Core/Channel/Channel.fs +++ b/src/DotNetLightning.Core/Channel/Channel.fs @@ -123,7 +123,7 @@ module Channel = YourLastPerCommitmentSecret = commitments.RemotePerCommitmentSecrets.LastRevocationKey() MyCurrentPerCommitmentPoint = - commitments.RemoteCommit.RemotePerCommitmentPoint + commitmentSeed.DeriveCommitmentPubKey commitments.RemoteCommit.Index } } [ WeSentChannelReestablish ourChannelReestablish ] |> Ok