From: Matt Corallo Date: Sat, 15 Feb 2020 03:32:30 +0000 (-0500) Subject: Fix apparent error in sending DataLossProtect X-Git-Url: http://git.bitcoin.ninja/?a=commitdiff_plain;h=1e407e762cb41592006dc2b7083e0460fa7166b4;p=rust-lightning Fix apparent error in sending DataLossProtect XXX: IIRC this was updated on the RFCs --- 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 {