@@ -1229,7 +1229,7 @@ fn conditionally_round_fwd_amt() {
12291229
12301230
12311231#[ test]
1232- fn sender_custom_tlvs_to_blinded_path ( ) {
1232+ fn custom_tlvs_to_blinded_path ( ) {
12331233 let chanmon_cfgs = create_chanmon_cfgs ( 2 ) ;
12341234 let node_cfgs = create_node_cfgs ( 2 , & chanmon_cfgs) ;
12351235 let node_chanmgrs = create_node_chanmgrs ( 2 , & node_cfgs, & [ None , None ] ) ;
@@ -1245,7 +1245,7 @@ fn sender_custom_tlvs_to_blinded_path() {
12451245 htlc_minimum_msat : chan_upd. htlc_minimum_msat ,
12461246 } ,
12471247 payment_context : PaymentContext :: Bolt12Refund ( Bolt12RefundContext { } ) ,
1248- custom_data : None ,
1248+ custom_data : Some ( vec ! [ 43 , 43 ] ) ,
12491249 } ;
12501250 let nonce = Nonce ( [ 42u8 ; 16 ] ) ;
12511251 let expanded_key = chanmon_cfgs[ 1 ] . keys_manager . get_inbound_payment_key ( ) ;
@@ -1262,6 +1262,7 @@ fn sender_custom_tlvs_to_blinded_path() {
12621262 ) ;
12631263
12641264 let recipient_onion_fields = RecipientOnionFields :: spontaneous_empty ( )
1265+ . with_user_custom_data ( vec ! [ 43 , 43 ] )
12651266 . with_sender_custom_tlvs ( vec ! [ ( ( 1 << 16 ) + 1 , vec![ 42 , 42 ] ) ] )
12661267 . unwrap ( ) ;
12671268 nodes[ 0 ] . node . send_payment ( payment_hash, recipient_onion_fields. clone ( ) ,
@@ -1274,11 +1275,13 @@ fn sender_custom_tlvs_to_blinded_path() {
12741275
12751276 let path = & [ & nodes[ 1 ] ] ;
12761277 let args = PassAlongPathArgs :: new ( & nodes[ 0 ] , path, amt_msat, payment_hash, ev)
1278+ . with_user_custom_data ( recipient_onion_fields. user_custom_data . clone ( ) . unwrap ( ) )
12771279 . with_payment_secret ( payment_secret)
12781280 . with_sender_custom_tlvs ( recipient_onion_fields. sender_custom_tlvs . clone ( ) ) ;
12791281 do_pass_along_path ( args) ;
12801282 claim_payment_along_route (
12811283 ClaimAlongRouteArgs :: new ( & nodes[ 0 ] , & [ & [ & nodes[ 1 ] ] ] , payment_preimage)
1284+ . with_user_custom_data ( recipient_onion_fields. user_custom_data . clone ( ) . unwrap ( ) )
12821285 . with_sender_custom_tlvs ( recipient_onion_fields. sender_custom_tlvs . clone ( ) )
12831286 ) ;
12841287}
0 commit comments