@@ -1363,7 +1363,7 @@ fn invalid_keysend_payment_secret() {
13631363}
13641364
13651365#[ test]
1366- fn sender_custom_tlvs_to_blinded_path ( ) {
1366+ fn custom_tlvs_to_blinded_path ( ) {
13671367 let chanmon_cfgs = create_chanmon_cfgs ( 2 ) ;
13681368 let node_cfgs = create_node_cfgs ( 2 , & chanmon_cfgs) ;
13691369 let node_chanmgrs = create_node_chanmgrs ( 2 , & node_cfgs, & [ None , None ] ) ;
@@ -1379,7 +1379,7 @@ fn sender_custom_tlvs_to_blinded_path() {
13791379 htlc_minimum_msat : chan_upd. htlc_minimum_msat ,
13801380 } ,
13811381 payment_context : PaymentContext :: unknown ( ) ,
1382- custom_data : Vec :: new ( ) ,
1382+ custom_data : vec ! [ 43 , 43 ] ,
13831383 } ;
13841384 let mut secp_ctx = Secp256k1 :: new ( ) ;
13851385 let blinded_path = BlindedPaymentPath :: new (
@@ -1393,6 +1393,7 @@ fn sender_custom_tlvs_to_blinded_path() {
13931393 ) ;
13941394
13951395 let recipient_onion_fields = RecipientOnionFields :: spontaneous_empty ( )
1396+ . with_user_custom_data ( vec ! [ 43 , 43 ] )
13961397 . with_sender_custom_tlvs ( vec ! [ ( ( 1 << 16 ) + 1 , vec![ 42 , 42 ] ) ] )
13971398 . unwrap ( ) ;
13981399 nodes[ 0 ] . node . send_payment ( payment_hash, recipient_onion_fields. clone ( ) ,
@@ -1406,10 +1407,12 @@ fn sender_custom_tlvs_to_blinded_path() {
14061407 let path = & [ & nodes[ 1 ] ] ;
14071408 let args = PassAlongPathArgs :: new ( & nodes[ 0 ] , path, amt_msat, payment_hash, ev)
14081409 . with_payment_secret ( payment_secret)
1410+ . with_user_custom_data ( recipient_onion_fields. user_custom_data . clone ( ) )
14091411 . with_sender_custom_tlvs ( recipient_onion_fields. sender_custom_tlvs . clone ( ) ) ;
14101412 do_pass_along_path ( args) ;
14111413 claim_payment_along_route (
14121414 ClaimAlongRouteArgs :: new ( & nodes[ 0 ] , & [ & [ & nodes[ 1 ] ] ] , payment_preimage)
1415+ . with_user_custom_data ( recipient_onion_fields. user_custom_data . clone ( ) )
14131416 . with_sender_custom_tlvs ( recipient_onion_fields. sender_custom_tlvs . clone ( ) )
14141417 ) ;
14151418}
0 commit comments