@@ -1229,7 +1229,7 @@ fn conditionally_round_fwd_amt() {
1229
1229
1230
1230
1231
1231
#[ test]
1232
- fn sender_custom_tlvs_to_blinded_path ( ) {
1232
+ fn custom_tlvs_to_blinded_path ( ) {
1233
1233
let chanmon_cfgs = create_chanmon_cfgs ( 2 ) ;
1234
1234
let node_cfgs = create_node_cfgs ( 2 , & chanmon_cfgs) ;
1235
1235
let node_chanmgrs = create_node_chanmgrs ( 2 , & node_cfgs, & [ None , None ] ) ;
@@ -1245,7 +1245,7 @@ fn sender_custom_tlvs_to_blinded_path() {
1245
1245
htlc_minimum_msat : chan_upd. htlc_minimum_msat ,
1246
1246
} ,
1247
1247
payment_context : PaymentContext :: Bolt12Refund ( Bolt12RefundContext { } ) ,
1248
- custom_data : None ,
1248
+ custom_data : Some ( vec ! [ 43 , 43 ] ) ,
1249
1249
} ;
1250
1250
let nonce = Nonce ( [ 42u8 ; 16 ] ) ;
1251
1251
let expanded_key = chanmon_cfgs[ 1 ] . keys_manager . get_inbound_payment_key ( ) ;
@@ -1262,6 +1262,7 @@ fn sender_custom_tlvs_to_blinded_path() {
1262
1262
) ;
1263
1263
1264
1264
let recipient_onion_fields = RecipientOnionFields :: spontaneous_empty ( )
1265
+ . with_user_custom_data ( vec ! [ 43 , 43 ] )
1265
1266
. with_sender_custom_tlvs ( vec ! [ ( ( 1 << 16 ) + 1 , vec![ 42 , 42 ] ) ] )
1266
1267
. unwrap ( ) ;
1267
1268
nodes[ 0 ] . node . send_payment ( payment_hash, recipient_onion_fields. clone ( ) ,
@@ -1274,11 +1275,13 @@ fn sender_custom_tlvs_to_blinded_path() {
1274
1275
1275
1276
let path = & [ & nodes[ 1 ] ] ;
1276
1277
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 ( ) )
1277
1279
. with_payment_secret ( payment_secret)
1278
1280
. with_sender_custom_tlvs ( recipient_onion_fields. sender_custom_tlvs . clone ( ) ) ;
1279
1281
do_pass_along_path ( args) ;
1280
1282
claim_payment_along_route (
1281
1283
ClaimAlongRouteArgs :: new ( & nodes[ 0 ] , & [ & [ & nodes[ 1 ] ] ] , payment_preimage)
1284
+ . with_user_custom_data ( recipient_onion_fields. user_custom_data . clone ( ) . unwrap ( ) )
1282
1285
. with_sender_custom_tlvs ( recipient_onion_fields. sender_custom_tlvs . clone ( ) )
1283
1286
) ;
1284
1287
}
0 commit comments