@@ -1288,7 +1288,7 @@ fn conditionally_round_fwd_amt() {
12881288
12891289
12901290#[ test]
1291- fn sender_custom_tlvs_to_blinded_path ( ) {
1291+ fn custom_tlvs_to_blinded_path ( ) {
12921292 let chanmon_cfgs = create_chanmon_cfgs ( 2 ) ;
12931293 let node_cfgs = create_node_cfgs ( 2 , & chanmon_cfgs) ;
12941294 let node_chanmgrs = create_node_chanmgrs ( 2 , & node_cfgs, & [ None , None ] ) ;
@@ -1304,7 +1304,7 @@ fn sender_custom_tlvs_to_blinded_path() {
13041304 htlc_minimum_msat : chan_upd. htlc_minimum_msat ,
13051305 } ,
13061306 payment_context : PaymentContext :: Bolt12Refund ( Bolt12RefundContext { } ) ,
1307- custom_data : None ,
1307+ custom_data : Some ( vec ! [ 43 , 43 ] ) ,
13081308 } ;
13091309 let nonce = Nonce ( [ 42u8 ; 16 ] ) ;
13101310 let expanded_key = chanmon_cfgs[ 1 ] . keys_manager . get_inbound_payment_key ( ) ;
@@ -1321,6 +1321,7 @@ fn sender_custom_tlvs_to_blinded_path() {
13211321 ) ;
13221322
13231323 let recipient_onion_fields = RecipientOnionFields :: spontaneous_empty ( )
1324+ . with_user_custom_data ( vec ! [ 43 , 43 ] )
13241325 . with_sender_custom_tlvs ( vec ! [ ( ( 1 << 16 ) + 1 , vec![ 42 , 42 ] ) ] )
13251326 . unwrap ( ) ;
13261327 nodes[ 0 ] . node . send_payment ( payment_hash, recipient_onion_fields. clone ( ) ,
@@ -1333,11 +1334,13 @@ fn sender_custom_tlvs_to_blinded_path() {
13331334
13341335 let path = & [ & nodes[ 1 ] ] ;
13351336 let args = PassAlongPathArgs :: new ( & nodes[ 0 ] , path, amt_msat, payment_hash, ev)
1337+ . with_user_custom_data ( recipient_onion_fields. user_custom_data . clone ( ) . unwrap ( ) )
13361338 . with_payment_secret ( payment_secret)
13371339 . with_sender_custom_tlvs ( recipient_onion_fields. sender_custom_tlvs . clone ( ) ) ;
13381340 do_pass_along_path ( args) ;
13391341 claim_payment_along_route (
13401342 ClaimAlongRouteArgs :: new ( & nodes[ 0 ] , & [ & [ & nodes[ 1 ] ] ] , payment_preimage)
1343+ . with_user_custom_data ( recipient_onion_fields. user_custom_data . clone ( ) . unwrap ( ) )
13411344 . with_sender_custom_tlvs ( recipient_onion_fields. sender_custom_tlvs . clone ( ) )
13421345 ) ;
13431346}
0 commit comments