@@ -33,7 +33,7 @@ use crate::onion_message::messenger::{Destination, MessageRouter, MessageSendIns
3333use crate :: onion_message:: offers:: OffersMessage ;
3434use crate :: onion_message:: packet:: ParsedOnionMessageContents ;
3535use crate :: prelude:: * ;
36- use crate :: routing:: router:: { Payee , PaymentParameters } ;
36+ use crate :: routing:: router:: { Payee , PaymentParameters , RouteParametersConfig } ;
3737use crate :: sign:: NodeSigner ;
3838use crate :: sync:: Mutex ;
3939use crate :: types:: features:: Bolt12InvoiceFeatures ;
@@ -238,7 +238,15 @@ fn static_invoice_unknown_required_features() {
238238 let payment_id = PaymentId ( [ 1 ; 32 ] ) ;
239239 nodes[ 0 ]
240240 . node
241- . pay_for_offer ( & offer, None , Some ( amt_msat) , None , payment_id, Retry :: Attempts ( 0 ) , None )
241+ . pay_for_offer (
242+ & offer,
243+ None ,
244+ Some ( amt_msat) ,
245+ None ,
246+ payment_id,
247+ Retry :: Attempts ( 0 ) ,
248+ RouteParametersConfig :: default ( ) ,
249+ )
242250 . unwrap ( ) ;
243251
244252 // Don't forward the invreq since we don't support retrieving the static invoice from the
@@ -298,7 +306,15 @@ fn ignore_unexpected_static_invoice() {
298306 let payment_id = PaymentId ( [ 1 ; 32 ] ) ;
299307 nodes[ 0 ]
300308 . node
301- . pay_for_offer ( & offer, None , Some ( amt_msat) , None , payment_id, Retry :: Attempts ( 0 ) , None )
309+ . pay_for_offer (
310+ & offer,
311+ None ,
312+ Some ( amt_msat) ,
313+ None ,
314+ payment_id,
315+ Retry :: Attempts ( 0 ) ,
316+ RouteParametersConfig :: default ( ) ,
317+ )
302318 . unwrap ( ) ;
303319
304320 // Don't forward the invreq since we don't support retrieving the static invoice from the
@@ -415,7 +431,15 @@ fn async_receive_flow_success() {
415431 let payment_id = PaymentId ( [ 1 ; 32 ] ) ;
416432 nodes[ 0 ]
417433 . node
418- . pay_for_offer ( & offer, None , Some ( amt_msat) , None , payment_id, Retry :: Attempts ( 0 ) , None )
434+ . pay_for_offer (
435+ & offer,
436+ None ,
437+ Some ( amt_msat) ,
438+ None ,
439+ payment_id,
440+ Retry :: Attempts ( 0 ) ,
441+ RouteParametersConfig :: default ( ) ,
442+ )
419443 . unwrap ( ) ;
420444 let release_held_htlc_om =
421445 pass_async_payments_oms ( static_invoice, & nodes[ 0 ] , & nodes[ 1 ] , & nodes[ 2 ] ) . 1 ;
@@ -463,7 +487,15 @@ fn expired_static_invoice_fail() {
463487 let payment_id = PaymentId ( [ 1 ; 32 ] ) ;
464488 nodes[ 0 ]
465489 . node
466- . pay_for_offer ( & offer, None , Some ( amt_msat) , None , payment_id, Retry :: Attempts ( 0 ) , None )
490+ . pay_for_offer (
491+ & offer,
492+ None ,
493+ Some ( amt_msat) ,
494+ None ,
495+ payment_id,
496+ Retry :: Attempts ( 0 ) ,
497+ RouteParametersConfig :: default ( ) ,
498+ )
467499 . unwrap ( ) ;
468500
469501 let invreq_om = nodes[ 0 ]
@@ -546,7 +578,15 @@ fn async_receive_mpp() {
546578 let payment_id = PaymentId ( [ 1 ; 32 ] ) ;
547579 nodes[ 0 ]
548580 . node
549- . pay_for_offer ( & offer, None , Some ( amt_msat) , None , payment_id, Retry :: Attempts ( 1 ) , None )
581+ . pay_for_offer (
582+ & offer,
583+ None ,
584+ Some ( amt_msat) ,
585+ None ,
586+ payment_id,
587+ Retry :: Attempts ( 1 ) ,
588+ RouteParametersConfig :: default ( ) ,
589+ )
550590 . unwrap ( ) ;
551591 let release_held_htlc_om_3_0 =
552592 pass_async_payments_oms ( static_invoice, & nodes[ 0 ] , & nodes[ 1 ] , & nodes[ 3 ] ) . 1 ;
@@ -630,7 +670,15 @@ fn amount_doesnt_match_invreq() {
630670 let payment_id = PaymentId ( [ 1 ; 32 ] ) ;
631671 nodes[ 0 ]
632672 . node
633- . pay_for_offer ( & offer, None , Some ( amt_msat) , None , payment_id, Retry :: Attempts ( 1 ) , None )
673+ . pay_for_offer (
674+ & offer,
675+ None ,
676+ Some ( amt_msat) ,
677+ None ,
678+ payment_id,
679+ Retry :: Attempts ( 1 ) ,
680+ RouteParametersConfig :: default ( ) ,
681+ )
634682 . unwrap ( ) ;
635683 let release_held_htlc_om_3_0 =
636684 pass_async_payments_oms ( static_invoice, & nodes[ 0 ] , & nodes[ 1 ] , & nodes[ 3 ] ) . 1 ;
@@ -859,7 +907,15 @@ fn invalid_async_receive_with_retry<F1, F2>(
859907
860908 nodes[ 0 ]
861909 . node
862- . pay_for_offer ( & offer, None , Some ( amt_msat) , None , payment_id, Retry :: Attempts ( 2 ) , None )
910+ . pay_for_offer (
911+ & offer,
912+ None ,
913+ Some ( amt_msat) ,
914+ None ,
915+ payment_id,
916+ Retry :: Attempts ( 2 ) ,
917+ RouteParametersConfig :: default ( ) ,
918+ )
863919 . unwrap ( ) ;
864920 let release_held_htlc_om_2_0 =
865921 pass_async_payments_oms ( static_invoice, & nodes[ 0 ] , & nodes[ 1 ] , & nodes[ 2 ] ) . 1 ;
@@ -948,7 +1004,15 @@ fn expired_static_invoice_message_path() {
9481004 let payment_id = PaymentId ( [ 1 ; 32 ] ) ;
9491005 nodes[ 0 ]
9501006 . node
951- . pay_for_offer ( & offer, None , Some ( amt_msat) , None , payment_id, Retry :: Attempts ( 1 ) , None )
1007+ . pay_for_offer (
1008+ & offer,
1009+ None ,
1010+ Some ( amt_msat) ,
1011+ None ,
1012+ payment_id,
1013+ Retry :: Attempts ( 1 ) ,
1014+ RouteParametersConfig :: default ( ) ,
1015+ )
9521016 . unwrap ( ) ;
9531017
9541018 // While the invoice is unexpired, respond with release_held_htlc.
@@ -1052,7 +1116,15 @@ fn expired_static_invoice_payment_path() {
10521116 let payment_id = PaymentId ( [ 1 ; 32 ] ) ;
10531117 nodes[ 0 ]
10541118 . node
1055- . pay_for_offer ( & offer, None , Some ( amt_msat) , None , payment_id, Retry :: Attempts ( 0 ) , None )
1119+ . pay_for_offer (
1120+ & offer,
1121+ None ,
1122+ Some ( amt_msat) ,
1123+ None ,
1124+ payment_id,
1125+ Retry :: Attempts ( 0 ) ,
1126+ RouteParametersConfig :: default ( ) ,
1127+ )
10561128 . unwrap ( ) ;
10571129 let release_held_htlc_om =
10581130 pass_async_payments_oms ( static_invoice, & nodes[ 0 ] , & nodes[ 1 ] , & nodes[ 2 ] ) . 1 ;
0 commit comments