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 {
98
98
found_recv_payload = true ;
99
99
} else if found_recv_payload { return Err ( ( ) ) }
100
100
}
101
+ if !found_recv_payload { return Err ( ( ) ) }
101
102
102
103
let blinding_secret_bytes = entropy_source. get_secure_random_bytes ( ) ;
103
104
let blinding_secret = SecretKey :: from_slice ( & blinding_secret_bytes[ ..] ) . expect ( "RNG is busted" ) ;
Original file line number Diff line number Diff line change @@ -324,5 +324,20 @@ mod tests {
324
324
features: BlindedHopFeatures :: empty( ) ,
325
325
} ) ] ;
326
326
assert ! ( BlindedPath :: new_for_payment( & multiple_recv_payloads_path[ ..] , & keys_manager, & secp_ctx) . is_err( ) ) ;
327
+
328
+ let missing_recv_payload_path = vec ! [ ( dummy_pk, BlindedPaymentTlvs :: Forward {
329
+ short_channel_id: 0 ,
330
+ payment_relay: PaymentRelay {
331
+ cltv_expiry_delta: 144 ,
332
+ fee_proportional_millionths: 500 ,
333
+ fee_base_msat: 100 ,
334
+ } ,
335
+ payment_constraints: PaymentConstraints {
336
+ max_cltv_expiry: 0 ,
337
+ htlc_minimum_msat: 100 ,
338
+ } ,
339
+ features: BlindedHopFeatures :: empty( ) ,
340
+ } ) ] ;
341
+ assert ! ( BlindedPath :: new_for_payment( & missing_recv_payload_path[ ..] , & keys_manager, & secp_ctx) . is_err( ) ) ;
327
342
}
328
343
}
You can’t perform that action at this time.
0 commit comments