File tree Expand file tree Collapse file tree 2 files changed +16
-0
lines changed 
lightning/src/blinded_path Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -98,6 +98,7 @@ impl BlindedPath {
9898				found_recv_payload = true ; 
9999			}  else  if  found_recv_payload {  return  Err ( ( ) )  } 
100100		} 
101+ 		if  !found_recv_payload {  return  Err ( ( ) )  } 
101102
102103		let  blinding_secret_bytes = entropy_source. get_secure_random_bytes ( ) ; 
103104		let  blinding_secret = SecretKey :: from_slice ( & blinding_secret_bytes[ ..] ) . expect ( "RNG is busted" ) ; 
Original file line number Diff line number Diff line change @@ -334,5 +334,20 @@ mod tests {
334334			features:  BlindedHopFeatures :: empty( ) , 
335335		} ) ] ; 
336336		assert ! ( BlindedPath :: new_for_payment( & multiple_recv_payloads_path[ ..] ,  & keys_manager,  & secp_ctx) . is_err( ) ) ; 
337+ 
338+ 		let  missing_recv_payload_path = vec ! [ ( dummy_pk,  BlindedPaymentTlvs :: Forward  { 
339+ 			short_channel_id:  0 , 
340+ 			payment_relay:  PaymentRelay  { 
341+ 				cltv_expiry_delta:  144 , 
342+ 				fee_proportional_millionths:  500 , 
343+ 				fee_base_msat:  100 , 
344+ 			} , 
345+ 			payment_constraints:  PaymentConstraints  { 
346+ 				max_cltv_expiry:  0 , 
347+ 				htlc_minimum_msat:  100 , 
348+ 			} , 
349+ 			features:  BlindedHopFeatures :: empty( ) , 
350+ 		} ) ] ; 
351+ 		assert ! ( BlindedPath :: new_for_payment( & missing_recv_payload_path[ ..] ,  & keys_manager,  & secp_ctx) . is_err( ) ) ; 
337352	} 
338353} 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments