From: Matt Corallo Date: Mon, 4 May 2020 17:56:53 +0000 (-0400) Subject: f note why we use a dummy pubkey as req by antoine X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=ae1673172b5c39b35348cfb9caa605875891fb73;p=rust-lightning f note why we use a dummy pubkey as req by antoine --- diff --git a/lightning/src/ln/channel.rs b/lightning/src/ln/channel.rs index 7a483ae14..879cb9f8b 100644 --- a/lightning/src/ln/channel.rs +++ b/lightning/src/ln/channel.rs @@ -3459,6 +3459,9 @@ impl Channel { pub fn get_channel_reestablish(&self) -> msgs::ChannelReestablish { assert_eq!(self.channel_state & ChannelState::PeerDisconnected as u32, ChannelState::PeerDisconnected as u32); assert_ne!(self.cur_remote_commitment_transaction_number, INITIAL_COMMITMENT_NUMBER); + // Prior to static_remotekey, my_current_per_commitment_point was critical to claiming + // current to_remote balances. However, it no longer has any use, and thus is now simply + // set to a dummy (but valid, as required by the spec) public key. // fuzztarget mode marks a subset of pubkeys as invalid so that we can hit "invalid pubkey" // branches, but we unwrap it below, so we arbitrarily select a dummy pubkey which is both // valid, and valid in fuzztarget mode's arbitrary validity criteria: