@@ -1288,7 +1288,7 @@ fn conditionally_round_fwd_amt() {
1288
1288
1289
1289
1290
1290
#[ test]
1291
- fn sender_custom_tlvs_to_blinded_path ( ) {
1291
+ fn custom_tlvs_to_blinded_path ( ) {
1292
1292
let chanmon_cfgs = create_chanmon_cfgs ( 2 ) ;
1293
1293
let node_cfgs = create_node_cfgs ( 2 , & chanmon_cfgs) ;
1294
1294
let node_chanmgrs = create_node_chanmgrs ( 2 , & node_cfgs, & [ None , None ] ) ;
@@ -1304,7 +1304,7 @@ fn sender_custom_tlvs_to_blinded_path() {
1304
1304
htlc_minimum_msat : chan_upd. htlc_minimum_msat ,
1305
1305
} ,
1306
1306
payment_context : PaymentContext :: Bolt12Refund ( Bolt12RefundContext { } ) ,
1307
- custom_data : None ,
1307
+ custom_data : Some ( vec ! [ 43 , 43 ] ) ,
1308
1308
} ;
1309
1309
let nonce = Nonce ( [ 42u8 ; 16 ] ) ;
1310
1310
let expanded_key = chanmon_cfgs[ 1 ] . keys_manager . get_inbound_payment_key ( ) ;
@@ -1321,6 +1321,7 @@ fn sender_custom_tlvs_to_blinded_path() {
1321
1321
) ;
1322
1322
1323
1323
let recipient_onion_fields = RecipientOnionFields :: spontaneous_empty ( )
1324
+ . with_user_custom_data ( vec ! [ 43 , 43 ] )
1324
1325
. with_sender_custom_tlvs ( vec ! [ ( ( 1 << 16 ) + 1 , vec![ 42 , 42 ] ) ] )
1325
1326
. unwrap ( ) ;
1326
1327
nodes[ 0 ] . node . send_payment ( payment_hash, recipient_onion_fields. clone ( ) ,
@@ -1333,11 +1334,13 @@ fn sender_custom_tlvs_to_blinded_path() {
1333
1334
1334
1335
let path = & [ & nodes[ 1 ] ] ;
1335
1336
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 ( ) )
1336
1338
. with_payment_secret ( payment_secret)
1337
1339
. with_sender_custom_tlvs ( recipient_onion_fields. sender_custom_tlvs . clone ( ) ) ;
1338
1340
do_pass_along_path ( args) ;
1339
1341
claim_payment_along_route (
1340
1342
ClaimAlongRouteArgs :: new ( & nodes[ 0 ] , & [ & [ & nodes[ 1 ] ] ] , payment_preimage)
1343
+ . with_user_custom_data ( recipient_onion_fields. user_custom_data . clone ( ) . unwrap ( ) )
1341
1344
. with_sender_custom_tlvs ( recipient_onion_fields. sender_custom_tlvs . clone ( ) )
1342
1345
) ;
1343
1346
}
0 commit comments