From 1e407e762cb41592006dc2b7083e0460fa7166b4 Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Fri, 14 Feb 2020 22:32:30 -0500 Subject: [PATCH] Fix apparent error in sending DataLossProtect XXX: IIRC this was updated on the RFCs --- lightning/src/ln/channel.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lightning/src/ln/channel.rs b/lightning/src/ln/channel.rs index b0f544503..471dcbf22 100644 --- a/lightning/src/ln/channel.rs +++ b/lightning/src/ln/channel.rs @@ -3448,7 +3448,7 @@ impl Channel { log_debug!(self, "We don't seen yet any revoked secret, if this channnel has already been updated it means we are fallen-behind, you should wait for other peer closing"); OptionalField::Present(DataLossProtect { your_last_per_commitment_secret: [0;32], - my_current_per_commitment_point: PublicKey::from_secret_key(&self.secp_ctx, &self.build_local_commitment_secret(self.cur_local_commitment_transaction_number)) + my_current_per_commitment_point: PublicKey::from_secret_key(&self.secp_ctx, &self.build_local_commitment_secret(self.cur_local_commitment_transaction_number + 1)) }) }; msgs::ChannelReestablish { -- 2.39.5