@@ -2655,6 +2655,8 @@ mod tests {
2655
2655
let router = test_utils:: TestRouter :: new ( network_graph, & logger, & scorer) ;
2656
2656
let secp_ctx = Secp256k1 :: new ( ) ;
2657
2657
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 ] ) ;
2658
2660
2659
2661
let pending_events = Mutex :: new ( VecDeque :: new ( ) ) ;
2660
2662
let outbound_payments = OutboundPayments :: new ( new_hash_map ( ) ) ;
@@ -2672,9 +2674,8 @@ mod tests {
2672
2674
let invoice = OfferBuilder :: new ( recipient_pubkey ( ) )
2673
2675
. amount_msats ( 1000 )
2674
2676
. 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 ( )
2678
2679
. respond_with_no_std ( payment_paths ( ) , payment_hash ( ) , created_at) . unwrap ( )
2679
2680
. build ( ) . unwrap ( )
2680
2681
. sign ( recipient_sign) . unwrap ( ) ;
@@ -2711,15 +2712,16 @@ mod tests {
2711
2712
2712
2713
let pending_events = Mutex :: new ( VecDeque :: new ( ) ) ;
2713
2714
let outbound_payments = OutboundPayments :: new ( new_hash_map ( ) ) ;
2715
+ let expanded_key = ExpandedKey :: new ( & KeyMaterial ( [ 42 ; 32 ] ) ) ;
2716
+ let nonce = Nonce ( [ 0 ; 16 ] ) ;
2714
2717
let payment_id = PaymentId ( [ 0 ; 32 ] ) ;
2715
2718
let expiration = StaleExpiration :: AbsoluteTimeout ( Duration :: from_secs ( 100 ) ) ;
2716
2719
2717
2720
let invoice = OfferBuilder :: new ( recipient_pubkey ( ) )
2718
2721
. amount_msats ( 1000 )
2719
2722
. 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 ( )
2723
2725
. respond_with_no_std ( payment_paths ( ) , payment_hash ( ) , now ( ) ) . unwrap ( )
2724
2726
. build ( ) . unwrap ( )
2725
2727
. sign ( recipient_sign) . unwrap ( ) ;
@@ -2772,15 +2774,16 @@ mod tests {
2772
2774
2773
2775
let pending_events = Mutex :: new ( VecDeque :: new ( ) ) ;
2774
2776
let outbound_payments = OutboundPayments :: new ( new_hash_map ( ) ) ;
2777
+ let expanded_key = ExpandedKey :: new ( & KeyMaterial ( [ 42 ; 32 ] ) ) ;
2778
+ let nonce = Nonce ( [ 0 ; 16 ] ) ;
2775
2779
let payment_id = PaymentId ( [ 0 ; 32 ] ) ;
2776
2780
let expiration = StaleExpiration :: AbsoluteTimeout ( Duration :: from_secs ( 100 ) ) ;
2777
2781
2778
2782
let invoice = OfferBuilder :: new ( recipient_pubkey ( ) )
2779
2783
. amount_msats ( 1000 )
2780
2784
. 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 ( )
2784
2787
. respond_with_no_std ( payment_paths ( ) , payment_hash ( ) , now ( ) ) . unwrap ( )
2785
2788
. build ( ) . unwrap ( )
2786
2789
. sign ( recipient_sign) . unwrap ( ) ;
@@ -2865,7 +2868,7 @@ mod tests {
2865
2868
OfferBuilder :: new ( recipient_pubkey ( ) )
2866
2869
. amount_msats ( 1000 )
2867
2870
. 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)
2869
2872
. unwrap ( )
2870
2873
. build_and_sign ( )
2871
2874
. unwrap ( )
0 commit comments