File tree 1 file changed +4
-1
lines changed 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -3459,7 +3459,10 @@ impl<ChanSigner: ChannelKeys> Channel<ChanSigner> {
3459
3459
pub fn get_channel_reestablish ( & self ) -> msgs:: ChannelReestablish {
3460
3460
assert_eq ! ( self . channel_state & ChannelState :: PeerDisconnected as u32 , ChannelState :: PeerDisconnected as u32 ) ;
3461
3461
assert_ne ! ( self . cur_remote_commitment_transaction_number, INITIAL_COMMITMENT_NUMBER ) ;
3462
- let mut pk = [ 2 ; 33 ] ; pk[ 1 ] = 0xff ; // Select a dummy pubkey which is valid in both "real" and fuzztarget modes
3462
+ // fuzztarget mode marks a subset of pubkeys as invalid so that we can hit "invalid pubkey"
3463
+ // branches, but we unwrap it below, so we arbitrarily select a dummy pubkey which is both
3464
+ // valid, and valid in fuzztarget mode's arbitrary validity criteria:
3465
+ let mut pk = [ 2 ; 33 ] ; pk[ 1 ] = 0xff ;
3463
3466
let dummy_pubkey = PublicKey :: from_slice ( & pk) . unwrap ( ) ;
3464
3467
let data_loss_protect = if self . cur_remote_commitment_transaction_number + 1 < INITIAL_COMMITMENT_NUMBER {
3465
3468
let remote_last_secret = self . commitment_secrets . get_secret ( self . cur_remote_commitment_transaction_number + 2 ) . unwrap ( ) ;
You can’t perform that action at this time.
0 commit comments