@@ -393,7 +393,7 @@ fn test_onion_failure() {
393
393
let session_priv = SecretKey :: from_slice ( & [ 3 ; 32 ] ) . unwrap ( ) ;
394
394
let onion_keys = onion_utils:: construct_onion_keys ( & Secp256k1 :: new ( ) , & route. paths [ 0 ] , & session_priv) . unwrap ( ) ;
395
395
msg. reason = onion_utils:: build_first_hop_failure_packet ( & onion_keys[ 0 ] . shared_secret [ ..] , PERM |NODE |2 , & [ 0 ; 0 ] ) ;
396
- } , ||{ } , true , Some ( PERM |NODE |2 ) , Some ( NetworkUpdate :: NodeFailure { node_id : route. paths [ 0 ] [ 0 ] . pubkey , is_permanent : true } ) , None ) ;
396
+ } , ||{ } , true , Some ( PERM |NODE |2 ) , Some ( NetworkUpdate :: NodeFailure { node_id : route. paths [ 0 ] [ 0 ] . pubkey , is_permanent : true } ) , Some ( route . paths [ 0 ] [ 0 ] . short_channel_id ) ) ;
397
397
398
398
// final node failure
399
399
run_onion_failure_test_with_fail_intercept ( "permanent_node_failure" , 200 , & nodes, & route, & payment_hash, & payment_secret, |_msg| { } , |msg| {
@@ -402,7 +402,7 @@ fn test_onion_failure() {
402
402
msg. reason = onion_utils:: build_first_hop_failure_packet ( & onion_keys[ 1 ] . shared_secret [ ..] , PERM |NODE |2 , & [ 0 ; 0 ] ) ;
403
403
} , ||{
404
404
nodes[ 2 ] . node . fail_htlc_backwards ( & payment_hash) ;
405
- } , false , Some ( PERM |NODE |2 ) , Some ( NetworkUpdate :: NodeFailure { node_id : route. paths [ 0 ] [ 1 ] . pubkey , is_permanent : true } ) , None ) ;
405
+ } , false , Some ( PERM |NODE |2 ) , Some ( NetworkUpdate :: NodeFailure { node_id : route. paths [ 0 ] [ 1 ] . pubkey , is_permanent : true } ) , Some ( route . paths [ 0 ] [ 1 ] . short_channel_id ) ) ;
406
406
let ( _, payment_hash, payment_secret) = get_payment_preimage_hash ! ( nodes[ 2 ] ) ;
407
407
408
408
// intermediate node failure
@@ -414,7 +414,7 @@ fn test_onion_failure() {
414
414
msg. reason = onion_utils:: build_first_hop_failure_packet ( & onion_keys[ 0 ] . shared_secret [ ..] , PERM |NODE |3 , & [ 0 ; 0 ] ) ;
415
415
} , ||{
416
416
nodes[ 2 ] . node . fail_htlc_backwards ( & payment_hash) ;
417
- } , true , Some ( PERM |NODE |3 ) , Some ( NetworkUpdate :: NodeFailure { node_id : route. paths [ 0 ] [ 0 ] . pubkey , is_permanent : true } ) , None ) ;
417
+ } , true , Some ( PERM |NODE |3 ) , Some ( NetworkUpdate :: NodeFailure { node_id : route. paths [ 0 ] [ 0 ] . pubkey , is_permanent : true } ) , Some ( route . paths [ 0 ] [ 0 ] . short_channel_id ) ) ;
418
418
419
419
// final node failure
420
420
run_onion_failure_test_with_fail_intercept ( "required_node_feature_missing" , 200 , & nodes, & route, & payment_hash, & payment_secret, |_msg| { } , |msg| {
@@ -423,7 +423,7 @@ fn test_onion_failure() {
423
423
msg. reason = onion_utils:: build_first_hop_failure_packet ( & onion_keys[ 1 ] . shared_secret [ ..] , PERM |NODE |3 , & [ 0 ; 0 ] ) ;
424
424
} , ||{
425
425
nodes[ 2 ] . node . fail_htlc_backwards ( & payment_hash) ;
426
- } , false , Some ( PERM |NODE |3 ) , Some ( NetworkUpdate :: NodeFailure { node_id : route. paths [ 0 ] [ 1 ] . pubkey , is_permanent : true } ) , None ) ;
426
+ } , false , Some ( PERM |NODE |3 ) , Some ( NetworkUpdate :: NodeFailure { node_id : route. paths [ 0 ] [ 1 ] . pubkey , is_permanent : true } ) , Some ( route . paths [ 0 ] [ 1 ] . short_channel_id ) ) ;
427
427
let ( _, payment_hash, payment_secret) = get_payment_preimage_hash ! ( nodes[ 2 ] ) ;
428
428
429
429
// Our immediate peer sent UpdateFailMalformedHTLC because it couldn't understand the onion in
0 commit comments