f note why we use a dummy pubkey as req by antoine
authorMatt Corallo <git@bluematt.me>
Mon, 4 May 2020 17:56:53 +0000 (13:56 -0400)
committerMatt Corallo <git@bluematt.me>
Mon, 4 May 2020 17:56:53 +0000 (13:56 -0400)
lightning/src/ln/channel.rs

index 7a483ae142fb9d23f550e0c33239ac91c2da79d5..879cb9f8bc13345392ea0da2ab04ca9c54fc10eb 100644 (file)
@@ -3459,6 +3459,9 @@ impl<ChanSigner: ChannelKeys> Channel<ChanSigner> {
        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: