Skip to content

Commit ae16731

Browse files
committed
f note why we use a dummy pubkey as req by antoine
1 parent 2e69a6c commit ae16731

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lightning/src/ln/channel.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3459,6 +3459,9 @@ impl<ChanSigner: ChannelKeys> Channel<ChanSigner> {
34593459
pub fn get_channel_reestablish(&self) -> msgs::ChannelReestablish {
34603460
assert_eq!(self.channel_state & ChannelState::PeerDisconnected as u32, ChannelState::PeerDisconnected as u32);
34613461
assert_ne!(self.cur_remote_commitment_transaction_number, INITIAL_COMMITMENT_NUMBER);
3462+
// Prior to static_remotekey, my_current_per_commitment_point was critical to claiming
3463+
// current to_remote balances. However, it no longer has any use, and thus is now simply
3464+
// set to a dummy (but valid, as required by the spec) public key.
34623465
// fuzztarget mode marks a subset of pubkeys as invalid so that we can hit "invalid pubkey"
34633466
// branches, but we unwrap it below, so we arbitrarily select a dummy pubkey which is both
34643467
// valid, and valid in fuzztarget mode's arbitrary validity criteria:

0 commit comments

Comments
 (0)