@@ -2745,6 +2745,8 @@ mod tests {
27452745 let router = test_utils:: TestRouter :: new ( network_graph, & logger, & scorer) ;
27462746 let secp_ctx = Secp256k1 :: new ( ) ;
27472747 let keys_manager = test_utils:: TestKeysInterface :: new ( & [ 0 ; 32 ] , Network :: Testnet ) ;
2748+ let expanded_key = ExpandedKey :: new ( & KeyMaterial ( [ 42 ; 32 ] ) ) ;
2749+ let nonce = Nonce ( [ 0 ; 16 ] ) ;
27482750
27492751 let pending_events = Mutex :: new ( VecDeque :: new ( ) ) ;
27502752 let outbound_payments = OutboundPayments :: new ( new_hash_map ( ) ) ;
@@ -2762,9 +2764,8 @@ mod tests {
27622764 let invoice = OfferBuilder :: new ( recipient_pubkey ( ) )
27632765 . amount_msats ( 1000 )
27642766 . build ( ) . unwrap ( )
2765- . request_invoice ( vec ! [ 1 ; 32 ] , payer_pubkey ( ) ) . unwrap ( )
2766- . build ( ) . unwrap ( )
2767- . sign ( payer_sign) . unwrap ( )
2767+ . request_invoice ( & expanded_key, nonce, & secp_ctx, payment_id) . unwrap ( )
2768+ . build_and_sign ( ) . unwrap ( )
27682769 . respond_with_no_std ( payment_paths ( ) , payment_hash ( ) , created_at) . unwrap ( )
27692770 . build ( ) . unwrap ( )
27702771 . sign ( recipient_sign) . unwrap ( ) ;
@@ -2801,15 +2802,16 @@ mod tests {
28012802
28022803 let pending_events = Mutex :: new ( VecDeque :: new ( ) ) ;
28032804 let outbound_payments = OutboundPayments :: new ( new_hash_map ( ) ) ;
2805+ let expanded_key = ExpandedKey :: new ( & KeyMaterial ( [ 42 ; 32 ] ) ) ;
2806+ let nonce = Nonce ( [ 0 ; 16 ] ) ;
28042807 let payment_id = PaymentId ( [ 0 ; 32 ] ) ;
28052808 let expiration = StaleExpiration :: AbsoluteTimeout ( Duration :: from_secs ( 100 ) ) ;
28062809
28072810 let invoice = OfferBuilder :: new ( recipient_pubkey ( ) )
28082811 . amount_msats ( 1000 )
28092812 . build ( ) . unwrap ( )
2810- . request_invoice ( vec ! [ 1 ; 32 ] , payer_pubkey ( ) ) . unwrap ( )
2811- . build ( ) . unwrap ( )
2812- . sign ( payer_sign) . unwrap ( )
2813+ . request_invoice ( & expanded_key, nonce, & secp_ctx, payment_id) . unwrap ( )
2814+ . build_and_sign ( ) . unwrap ( )
28132815 . respond_with_no_std ( payment_paths ( ) , payment_hash ( ) , now ( ) ) . unwrap ( )
28142816 . build ( ) . unwrap ( )
28152817 . sign ( recipient_sign) . unwrap ( ) ;
@@ -2862,15 +2864,16 @@ mod tests {
28622864
28632865 let pending_events = Mutex :: new ( VecDeque :: new ( ) ) ;
28642866 let outbound_payments = OutboundPayments :: new ( new_hash_map ( ) ) ;
2867+ let expanded_key = ExpandedKey :: new ( & KeyMaterial ( [ 42 ; 32 ] ) ) ;
2868+ let nonce = Nonce ( [ 0 ; 16 ] ) ;
28652869 let payment_id = PaymentId ( [ 0 ; 32 ] ) ;
28662870 let expiration = StaleExpiration :: AbsoluteTimeout ( Duration :: from_secs ( 100 ) ) ;
28672871
28682872 let invoice = OfferBuilder :: new ( recipient_pubkey ( ) )
28692873 . amount_msats ( 1000 )
28702874 . build ( ) . unwrap ( )
2871- . request_invoice ( vec ! [ 1 ; 32 ] , payer_pubkey ( ) ) . unwrap ( )
2872- . build ( ) . unwrap ( )
2873- . sign ( payer_sign) . unwrap ( )
2875+ . request_invoice ( & expanded_key, nonce, & secp_ctx, payment_id) . unwrap ( )
2876+ . build_and_sign ( ) . unwrap ( )
28742877 . respond_with_no_std ( payment_paths ( ) , payment_hash ( ) , now ( ) ) . unwrap ( )
28752878 . build ( ) . unwrap ( )
28762879 . sign ( recipient_sign) . unwrap ( ) ;
@@ -2955,7 +2958,7 @@ mod tests {
29552958 OfferBuilder :: new ( recipient_pubkey ( ) )
29562959 . amount_msats ( 1000 )
29572960 . build ( ) . unwrap ( )
2958- . request_invoice_deriving_signing_pubkey ( & expanded_key, nonce, & secp_ctx, payment_id)
2961+ . request_invoice ( & expanded_key, nonce, & secp_ctx, payment_id)
29592962 . unwrap ( )
29602963 . build_and_sign ( )
29612964 . unwrap ( )
0 commit comments