@@ -2745,6 +2745,8 @@ mod tests {
2745
2745
let router = test_utils:: TestRouter :: new ( network_graph, & logger, & scorer) ;
2746
2746
let secp_ctx = Secp256k1 :: new ( ) ;
2747
2747
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 ] ) ;
2748
2750
2749
2751
let pending_events = Mutex :: new ( VecDeque :: new ( ) ) ;
2750
2752
let outbound_payments = OutboundPayments :: new ( new_hash_map ( ) ) ;
@@ -2762,9 +2764,8 @@ mod tests {
2762
2764
let invoice = OfferBuilder :: new ( recipient_pubkey ( ) )
2763
2765
. amount_msats ( 1000 )
2764
2766
. 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 ( )
2768
2769
. respond_with_no_std ( payment_paths ( ) , payment_hash ( ) , created_at) . unwrap ( )
2769
2770
. build ( ) . unwrap ( )
2770
2771
. sign ( recipient_sign) . unwrap ( ) ;
@@ -2801,15 +2802,16 @@ mod tests {
2801
2802
2802
2803
let pending_events = Mutex :: new ( VecDeque :: new ( ) ) ;
2803
2804
let outbound_payments = OutboundPayments :: new ( new_hash_map ( ) ) ;
2805
+ let expanded_key = ExpandedKey :: new ( & KeyMaterial ( [ 42 ; 32 ] ) ) ;
2806
+ let nonce = Nonce ( [ 0 ; 16 ] ) ;
2804
2807
let payment_id = PaymentId ( [ 0 ; 32 ] ) ;
2805
2808
let expiration = StaleExpiration :: AbsoluteTimeout ( Duration :: from_secs ( 100 ) ) ;
2806
2809
2807
2810
let invoice = OfferBuilder :: new ( recipient_pubkey ( ) )
2808
2811
. amount_msats ( 1000 )
2809
2812
. 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 ( )
2813
2815
. respond_with_no_std ( payment_paths ( ) , payment_hash ( ) , now ( ) ) . unwrap ( )
2814
2816
. build ( ) . unwrap ( )
2815
2817
. sign ( recipient_sign) . unwrap ( ) ;
@@ -2862,15 +2864,16 @@ mod tests {
2862
2864
2863
2865
let pending_events = Mutex :: new ( VecDeque :: new ( ) ) ;
2864
2866
let outbound_payments = OutboundPayments :: new ( new_hash_map ( ) ) ;
2867
+ let expanded_key = ExpandedKey :: new ( & KeyMaterial ( [ 42 ; 32 ] ) ) ;
2868
+ let nonce = Nonce ( [ 0 ; 16 ] ) ;
2865
2869
let payment_id = PaymentId ( [ 0 ; 32 ] ) ;
2866
2870
let expiration = StaleExpiration :: AbsoluteTimeout ( Duration :: from_secs ( 100 ) ) ;
2867
2871
2868
2872
let invoice = OfferBuilder :: new ( recipient_pubkey ( ) )
2869
2873
. amount_msats ( 1000 )
2870
2874
. 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 ( )
2874
2877
. respond_with_no_std ( payment_paths ( ) , payment_hash ( ) , now ( ) ) . unwrap ( )
2875
2878
. build ( ) . unwrap ( )
2876
2879
. sign ( recipient_sign) . unwrap ( ) ;
@@ -2955,7 +2958,7 @@ mod tests {
2955
2958
OfferBuilder :: new ( recipient_pubkey ( ) )
2956
2959
. amount_msats ( 1000 )
2957
2960
. 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)
2959
2962
. unwrap ( )
2960
2963
. build_and_sign ( )
2961
2964
. unwrap ( )
0 commit comments