Skip to content

Commit 33b7c90

Browse files
authored
Merge pull request #537 from TheBlueMatt/2020-03-data-loss-spec-550
Update pre-HTLC DataLossProtect to match new spec changes
2 parents feb0a9f + 4f06d7a commit 33b7c90

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lightning/src/ln/channel.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3444,10 +3444,10 @@ impl<ChanSigner: ChannelKeys> Channel<ChanSigner> {
34443444
my_current_per_commitment_point: PublicKey::from_secret_key(&self.secp_ctx, &self.build_local_commitment_secret(self.cur_local_commitment_transaction_number + 1))
34453445
})
34463446
} else {
3447-
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");
3447+
log_info!(self, "Sending a data_loss_protect with no previous remote per_commitment_secret");
34483448
OptionalField::Present(DataLossProtect {
34493449
your_last_per_commitment_secret: [0;32],
3450-
my_current_per_commitment_point: PublicKey::from_secret_key(&self.secp_ctx, &self.build_local_commitment_secret(self.cur_local_commitment_transaction_number))
3450+
my_current_per_commitment_point: PublicKey::from_secret_key(&self.secp_ctx, &self.build_local_commitment_secret(self.cur_local_commitment_transaction_number + 1))
34513451
})
34523452
};
34533453
msgs::ChannelReestablish {

0 commit comments

Comments
 (0)