@@ -2655,6 +2655,8 @@ mod tests {
26552655 let router = test_utils:: TestRouter :: new ( network_graph, & logger, & scorer) ;
26562656 let secp_ctx = Secp256k1 :: new ( ) ;
26572657 let keys_manager = test_utils:: TestKeysInterface :: new ( & [ 0 ; 32 ] , Network :: Testnet ) ;
2658+ let expanded_key = ExpandedKey :: new ( & KeyMaterial ( [ 42 ; 32 ] ) ) ;
2659+ let nonce = Nonce ( [ 0 ; 16 ] ) ;
26582660
26592661 let pending_events = Mutex :: new ( VecDeque :: new ( ) ) ;
26602662 let outbound_payments = OutboundPayments :: new ( new_hash_map ( ) ) ;
@@ -2672,9 +2674,8 @@ mod tests {
26722674 let invoice = OfferBuilder :: new ( recipient_pubkey ( ) )
26732675 . amount_msats ( 1000 )
26742676 . build ( ) . unwrap ( )
2675- . request_invoice ( vec ! [ 1 ; 32 ] , payer_pubkey ( ) ) . unwrap ( )
2676- . build ( ) . unwrap ( )
2677- . sign ( payer_sign) . unwrap ( )
2677+ . request_invoice ( & expanded_key, nonce, & secp_ctx, payment_id) . unwrap ( )
2678+ . build_and_sign ( ) . unwrap ( )
26782679 . respond_with_no_std ( payment_paths ( ) , payment_hash ( ) , created_at) . unwrap ( )
26792680 . build ( ) . unwrap ( )
26802681 . sign ( recipient_sign) . unwrap ( ) ;
@@ -2711,15 +2712,16 @@ mod tests {
27112712
27122713 let pending_events = Mutex :: new ( VecDeque :: new ( ) ) ;
27132714 let outbound_payments = OutboundPayments :: new ( new_hash_map ( ) ) ;
2715+ let expanded_key = ExpandedKey :: new ( & KeyMaterial ( [ 42 ; 32 ] ) ) ;
2716+ let nonce = Nonce ( [ 0 ; 16 ] ) ;
27142717 let payment_id = PaymentId ( [ 0 ; 32 ] ) ;
27152718 let expiration = StaleExpiration :: AbsoluteTimeout ( Duration :: from_secs ( 100 ) ) ;
27162719
27172720 let invoice = OfferBuilder :: new ( recipient_pubkey ( ) )
27182721 . amount_msats ( 1000 )
27192722 . build ( ) . unwrap ( )
2720- . request_invoice ( vec ! [ 1 ; 32 ] , payer_pubkey ( ) ) . unwrap ( )
2721- . build ( ) . unwrap ( )
2722- . sign ( payer_sign) . unwrap ( )
2723+ . request_invoice ( & expanded_key, nonce, & secp_ctx, payment_id) . unwrap ( )
2724+ . build_and_sign ( ) . unwrap ( )
27232725 . respond_with_no_std ( payment_paths ( ) , payment_hash ( ) , now ( ) ) . unwrap ( )
27242726 . build ( ) . unwrap ( )
27252727 . sign ( recipient_sign) . unwrap ( ) ;
@@ -2772,15 +2774,16 @@ mod tests {
27722774
27732775 let pending_events = Mutex :: new ( VecDeque :: new ( ) ) ;
27742776 let outbound_payments = OutboundPayments :: new ( new_hash_map ( ) ) ;
2777+ let expanded_key = ExpandedKey :: new ( & KeyMaterial ( [ 42 ; 32 ] ) ) ;
2778+ let nonce = Nonce ( [ 0 ; 16 ] ) ;
27752779 let payment_id = PaymentId ( [ 0 ; 32 ] ) ;
27762780 let expiration = StaleExpiration :: AbsoluteTimeout ( Duration :: from_secs ( 100 ) ) ;
27772781
27782782 let invoice = OfferBuilder :: new ( recipient_pubkey ( ) )
27792783 . amount_msats ( 1000 )
27802784 . build ( ) . unwrap ( )
2781- . request_invoice ( vec ! [ 1 ; 32 ] , payer_pubkey ( ) ) . unwrap ( )
2782- . build ( ) . unwrap ( )
2783- . sign ( payer_sign) . unwrap ( )
2785+ . request_invoice ( & expanded_key, nonce, & secp_ctx, payment_id) . unwrap ( )
2786+ . build_and_sign ( ) . unwrap ( )
27842787 . respond_with_no_std ( payment_paths ( ) , payment_hash ( ) , now ( ) ) . unwrap ( )
27852788 . build ( ) . unwrap ( )
27862789 . sign ( recipient_sign) . unwrap ( ) ;
@@ -2865,7 +2868,7 @@ mod tests {
28652868 OfferBuilder :: new ( recipient_pubkey ( ) )
28662869 . amount_msats ( 1000 )
28672870 . build ( ) . unwrap ( )
2868- . request_invoice_deriving_signing_pubkey ( & expanded_key, nonce, & secp_ctx, payment_id)
2871+ . request_invoice ( & expanded_key, nonce, & secp_ctx, payment_id)
28692872 . unwrap ( )
28702873 . build_and_sign ( )
28712874 . unwrap ( )
0 commit comments