@@ -1605,7 +1605,6 @@ mod tests {
1605
1605
1606
1606
use crate :: blinded_path:: BlindedHop ;
1607
1607
use crate :: blinded_path:: message:: BlindedMessagePath ;
1608
- use crate :: sign:: KeyMaterial ;
1609
1608
use crate :: types:: features:: { Bolt12InvoiceFeatures , InvoiceRequestFeatures , OfferFeatures } ;
1610
1609
use crate :: ln:: channelmanager:: PaymentId ;
1611
1610
use crate :: ln:: inbound_payment:: ExpandedKey ;
@@ -1649,7 +1648,7 @@ mod tests {
1649
1648
1650
1649
#[ test]
1651
1650
fn builds_invoice_for_offer_with_defaults ( ) {
1652
- let expanded_key = ExpandedKey :: new ( & KeyMaterial ( [ 42 ; 32 ] ) ) ;
1651
+ let expanded_key = ExpandedKey :: new ( [ 42 ; 32 ] ) ;
1653
1652
let entropy = FixedEntropy { } ;
1654
1653
let nonce = Nonce :: from_entropy_source ( & entropy) ;
1655
1654
let secp_ctx = Secp256k1 :: new ( ) ;
@@ -1913,7 +1912,7 @@ mod tests {
1913
1912
#[ cfg( feature = "std" ) ]
1914
1913
#[ test]
1915
1914
fn builds_invoice_from_offer_with_expiration ( ) {
1916
- let expanded_key = ExpandedKey :: new ( & KeyMaterial ( [ 42 ; 32 ] ) ) ;
1915
+ let expanded_key = ExpandedKey :: new ( [ 42 ; 32 ] ) ;
1917
1916
let entropy = FixedEntropy { } ;
1918
1917
let nonce = Nonce :: from_entropy_source ( & entropy) ;
1919
1918
let secp_ctx = Secp256k1 :: new ( ) ;
@@ -1981,7 +1980,7 @@ mod tests {
1981
1980
#[ test]
1982
1981
fn builds_invoice_from_offer_using_derived_keys ( ) {
1983
1982
let node_id = recipient_pubkey ( ) ;
1984
- let expanded_key = ExpandedKey :: new ( & KeyMaterial ( [ 42 ; 32 ] ) ) ;
1983
+ let expanded_key = ExpandedKey :: new ( [ 42 ; 32 ] ) ;
1985
1984
let entropy = FixedEntropy { } ;
1986
1985
let nonce = Nonce :: from_entropy_source ( & entropy) ;
1987
1986
let secp_ctx = Secp256k1 :: new ( ) ;
@@ -2014,7 +2013,7 @@ mod tests {
2014
2013
panic ! ( "error building invoice: {:?}" , e) ;
2015
2014
}
2016
2015
2017
- let expanded_key = ExpandedKey :: new ( & KeyMaterial ( [ 41 ; 32 ] ) ) ;
2016
+ let expanded_key = ExpandedKey :: new ( [ 41 ; 32 ] ) ;
2018
2017
assert ! (
2019
2018
invoice_request. verify_using_recipient_data( nonce, & expanded_key, & secp_ctx) . is_err( )
2020
2019
) ;
@@ -2039,7 +2038,7 @@ mod tests {
2039
2038
2040
2039
#[ test]
2041
2040
fn builds_invoice_from_refund_using_derived_keys ( ) {
2042
- let expanded_key = ExpandedKey :: new ( & KeyMaterial ( [ 42 ; 32 ] ) ) ;
2041
+ let expanded_key = ExpandedKey :: new ( [ 42 ; 32 ] ) ;
2043
2042
let entropy = FixedEntropy { } ;
2044
2043
let secp_ctx = Secp256k1 :: new ( ) ;
2045
2044
@@ -2061,7 +2060,7 @@ mod tests {
2061
2060
#[ test]
2062
2061
fn builds_invoice_from_refund_with_path ( ) {
2063
2062
let node_id = payer_pubkey ( ) ;
2064
- let expanded_key = ExpandedKey :: new ( & KeyMaterial ( [ 42 ; 32 ] ) ) ;
2063
+ let expanded_key = ExpandedKey :: new ( [ 42 ; 32 ] ) ;
2065
2064
let entropy = FixedEntropy { } ;
2066
2065
let secp_ctx = Secp256k1 :: new ( ) ;
2067
2066
@@ -2090,7 +2089,7 @@ mod tests {
2090
2089
2091
2090
#[ test]
2092
2091
fn builds_invoice_with_relative_expiry ( ) {
2093
- let expanded_key = ExpandedKey :: new ( & KeyMaterial ( [ 42 ; 32 ] ) ) ;
2092
+ let expanded_key = ExpandedKey :: new ( [ 42 ; 32 ] ) ;
2094
2093
let entropy = FixedEntropy { } ;
2095
2094
let nonce = Nonce :: from_entropy_source ( & entropy) ;
2096
2095
let secp_ctx = Secp256k1 :: new ( ) ;
@@ -2132,7 +2131,7 @@ mod tests {
2132
2131
2133
2132
#[ test]
2134
2133
fn builds_invoice_with_amount_from_request ( ) {
2135
- let expanded_key = ExpandedKey :: new ( & KeyMaterial ( [ 42 ; 32 ] ) ) ;
2134
+ let expanded_key = ExpandedKey :: new ( [ 42 ; 32 ] ) ;
2136
2135
let entropy = FixedEntropy { } ;
2137
2136
let nonce = Nonce :: from_entropy_source ( & entropy) ;
2138
2137
let secp_ctx = Secp256k1 :: new ( ) ;
@@ -2154,7 +2153,7 @@ mod tests {
2154
2153
2155
2154
#[ test]
2156
2155
fn builds_invoice_with_quantity_from_request ( ) {
2157
- let expanded_key = ExpandedKey :: new ( & KeyMaterial ( [ 42 ; 32 ] ) ) ;
2156
+ let expanded_key = ExpandedKey :: new ( [ 42 ; 32 ] ) ;
2158
2157
let entropy = FixedEntropy { } ;
2159
2158
let nonce = Nonce :: from_entropy_source ( & entropy) ;
2160
2159
let secp_ctx = Secp256k1 :: new ( ) ;
@@ -2190,7 +2189,7 @@ mod tests {
2190
2189
2191
2190
#[ test]
2192
2191
fn builds_invoice_with_fallback_address ( ) {
2193
- let expanded_key = ExpandedKey :: new ( & KeyMaterial ( [ 42 ; 32 ] ) ) ;
2192
+ let expanded_key = ExpandedKey :: new ( [ 42 ; 32 ] ) ;
2194
2193
let entropy = FixedEntropy { } ;
2195
2194
let nonce = Nonce :: from_entropy_source ( & entropy) ;
2196
2195
let secp_ctx = Secp256k1 :: new ( ) ;
@@ -2242,7 +2241,7 @@ mod tests {
2242
2241
2243
2242
#[ test]
2244
2243
fn builds_invoice_with_allow_mpp ( ) {
2245
- let expanded_key = ExpandedKey :: new ( & KeyMaterial ( [ 42 ; 32 ] ) ) ;
2244
+ let expanded_key = ExpandedKey :: new ( [ 42 ; 32 ] ) ;
2246
2245
let entropy = FixedEntropy { } ;
2247
2246
let nonce = Nonce :: from_entropy_source ( & entropy) ;
2248
2247
let secp_ctx = Secp256k1 :: new ( ) ;
@@ -2267,7 +2266,7 @@ mod tests {
2267
2266
2268
2267
#[ test]
2269
2268
fn fails_signing_invoice ( ) {
2270
- let expanded_key = ExpandedKey :: new ( & KeyMaterial ( [ 42 ; 32 ] ) ) ;
2269
+ let expanded_key = ExpandedKey :: new ( [ 42 ; 32 ] ) ;
2271
2270
let entropy = FixedEntropy { } ;
2272
2271
let nonce = Nonce :: from_entropy_source ( & entropy) ;
2273
2272
let secp_ctx = Secp256k1 :: new ( ) ;
@@ -2302,7 +2301,7 @@ mod tests {
2302
2301
2303
2302
#[ test]
2304
2303
fn parses_invoice_with_payment_paths ( ) {
2305
- let expanded_key = ExpandedKey :: new ( & KeyMaterial ( [ 42 ; 32 ] ) ) ;
2304
+ let expanded_key = ExpandedKey :: new ( [ 42 ; 32 ] ) ;
2306
2305
let entropy = FixedEntropy { } ;
2307
2306
let nonce = Nonce :: from_entropy_source ( & entropy) ;
2308
2307
let secp_ctx = Secp256k1 :: new ( ) ;
@@ -2362,7 +2361,7 @@ mod tests {
2362
2361
2363
2362
#[ test]
2364
2363
fn parses_invoice_with_created_at ( ) {
2365
- let expanded_key = ExpandedKey :: new ( & KeyMaterial ( [ 42 ; 32 ] ) ) ;
2364
+ let expanded_key = ExpandedKey :: new ( [ 42 ; 32 ] ) ;
2366
2365
let entropy = FixedEntropy { } ;
2367
2366
let nonce = Nonce :: from_entropy_source ( & entropy) ;
2368
2367
let secp_ctx = Secp256k1 :: new ( ) ;
@@ -2397,7 +2396,7 @@ mod tests {
2397
2396
2398
2397
#[ test]
2399
2398
fn parses_invoice_with_relative_expiry ( ) {
2400
- let expanded_key = ExpandedKey :: new ( & KeyMaterial ( [ 42 ; 32 ] ) ) ;
2399
+ let expanded_key = ExpandedKey :: new ( [ 42 ; 32 ] ) ;
2401
2400
let entropy = FixedEntropy { } ;
2402
2401
let nonce = Nonce :: from_entropy_source ( & entropy) ;
2403
2402
let secp_ctx = Secp256k1 :: new ( ) ;
@@ -2424,7 +2423,7 @@ mod tests {
2424
2423
2425
2424
#[ test]
2426
2425
fn parses_invoice_with_payment_hash ( ) {
2427
- let expanded_key = ExpandedKey :: new ( & KeyMaterial ( [ 42 ; 32 ] ) ) ;
2426
+ let expanded_key = ExpandedKey :: new ( [ 42 ; 32 ] ) ;
2428
2427
let entropy = FixedEntropy { } ;
2429
2428
let nonce = Nonce :: from_entropy_source ( & entropy) ;
2430
2429
let secp_ctx = Secp256k1 :: new ( ) ;
@@ -2459,7 +2458,7 @@ mod tests {
2459
2458
2460
2459
#[ test]
2461
2460
fn parses_invoice_with_amount ( ) {
2462
- let expanded_key = ExpandedKey :: new ( & KeyMaterial ( [ 42 ; 32 ] ) ) ;
2461
+ let expanded_key = ExpandedKey :: new ( [ 42 ; 32 ] ) ;
2463
2462
let entropy = FixedEntropy { } ;
2464
2463
let nonce = Nonce :: from_entropy_source ( & entropy) ;
2465
2464
let secp_ctx = Secp256k1 :: new ( ) ;
@@ -2492,7 +2491,7 @@ mod tests {
2492
2491
2493
2492
#[ test]
2494
2493
fn parses_invoice_with_allow_mpp ( ) {
2495
- let expanded_key = ExpandedKey :: new ( & KeyMaterial ( [ 42 ; 32 ] ) ) ;
2494
+ let expanded_key = ExpandedKey :: new ( [ 42 ; 32 ] ) ;
2496
2495
let entropy = FixedEntropy { } ;
2497
2496
let nonce = Nonce :: from_entropy_source ( & entropy) ;
2498
2497
let secp_ctx = Secp256k1 :: new ( ) ;
@@ -2523,7 +2522,7 @@ mod tests {
2523
2522
2524
2523
#[ test]
2525
2524
fn parses_invoice_with_fallback_address ( ) {
2526
- let expanded_key = ExpandedKey :: new ( & KeyMaterial ( [ 42 ; 32 ] ) ) ;
2525
+ let expanded_key = ExpandedKey :: new ( [ 42 ; 32 ] ) ;
2527
2526
let entropy = FixedEntropy { } ;
2528
2527
let nonce = Nonce :: from_entropy_source ( & entropy) ;
2529
2528
let secp_ctx = Secp256k1 :: new ( ) ;
@@ -2587,7 +2586,7 @@ mod tests {
2587
2586
2588
2587
#[ test]
2589
2588
fn parses_invoice_with_node_id ( ) {
2590
- let expanded_key = ExpandedKey :: new ( & KeyMaterial ( [ 42 ; 32 ] ) ) ;
2589
+ let expanded_key = ExpandedKey :: new ( [ 42 ; 32 ] ) ;
2591
2590
let entropy = FixedEntropy { } ;
2592
2591
let nonce = Nonce :: from_entropy_source ( & entropy) ;
2593
2592
let secp_ctx = Secp256k1 :: new ( ) ;
@@ -2633,7 +2632,7 @@ mod tests {
2633
2632
2634
2633
#[ test]
2635
2634
fn parses_invoice_with_node_id_from_blinded_path ( ) {
2636
- let expanded_key = ExpandedKey :: new ( & KeyMaterial ( [ 42 ; 32 ] ) ) ;
2635
+ let expanded_key = ExpandedKey :: new ( [ 42 ; 32 ] ) ;
2637
2636
let entropy = FixedEntropy { } ;
2638
2637
let nonce = Nonce :: from_entropy_source ( & entropy) ;
2639
2638
let secp_ctx = Secp256k1 :: new ( ) ;
@@ -2710,7 +2709,7 @@ mod tests {
2710
2709
2711
2710
#[ test]
2712
2711
fn fails_parsing_invoice_without_signature ( ) {
2713
- let expanded_key = ExpandedKey :: new ( & KeyMaterial ( [ 42 ; 32 ] ) ) ;
2712
+ let expanded_key = ExpandedKey :: new ( [ 42 ; 32 ] ) ;
2714
2713
let entropy = FixedEntropy { } ;
2715
2714
let nonce = Nonce :: from_entropy_source ( & entropy) ;
2716
2715
let secp_ctx = Secp256k1 :: new ( ) ;
@@ -2735,7 +2734,7 @@ mod tests {
2735
2734
2736
2735
#[ test]
2737
2736
fn fails_parsing_invoice_with_invalid_signature ( ) {
2738
- let expanded_key = ExpandedKey :: new ( & KeyMaterial ( [ 42 ; 32 ] ) ) ;
2737
+ let expanded_key = ExpandedKey :: new ( [ 42 ; 32 ] ) ;
2739
2738
let entropy = FixedEntropy { } ;
2740
2739
let nonce = Nonce :: from_entropy_source ( & entropy) ;
2741
2740
let secp_ctx = Secp256k1 :: new ( ) ;
@@ -2765,7 +2764,7 @@ mod tests {
2765
2764
2766
2765
#[ test]
2767
2766
fn parses_invoice_with_unknown_tlv_records ( ) {
2768
- let expanded_key = ExpandedKey :: new ( & KeyMaterial ( [ 42 ; 32 ] ) ) ;
2767
+ let expanded_key = ExpandedKey :: new ( [ 42 ; 32 ] ) ;
2769
2768
let entropy = FixedEntropy { } ;
2770
2769
let nonce = Nonce :: from_entropy_source ( & entropy) ;
2771
2770
let payment_id = PaymentId ( [ 1 ; 32 ] ) ;
@@ -2849,7 +2848,7 @@ mod tests {
2849
2848
2850
2849
#[ test]
2851
2850
fn parses_invoice_with_experimental_tlv_records ( ) {
2852
- let expanded_key = ExpandedKey :: new ( & KeyMaterial ( [ 42 ; 32 ] ) ) ;
2851
+ let expanded_key = ExpandedKey :: new ( [ 42 ; 32 ] ) ;
2853
2852
let entropy = FixedEntropy { } ;
2854
2853
let nonce = Nonce :: from_entropy_source ( & entropy) ;
2855
2854
let payment_id = PaymentId ( [ 1 ; 32 ] ) ;
@@ -2979,7 +2978,7 @@ mod tests {
2979
2978
2980
2979
#[ test]
2981
2980
fn fails_parsing_invoice_with_out_of_range_tlv_records ( ) {
2982
- let expanded_key = ExpandedKey :: new ( & KeyMaterial ( [ 42 ; 32 ] ) ) ;
2981
+ let expanded_key = ExpandedKey :: new ( [ 42 ; 32 ] ) ;
2983
2982
let entropy = FixedEntropy { } ;
2984
2983
let nonce = Nonce :: from_entropy_source ( & entropy) ;
2985
2984
let secp_ctx = Secp256k1 :: new ( ) ;
@@ -3008,7 +3007,7 @@ mod tests {
3008
3007
3009
3008
#[ test]
3010
3009
fn fails_parsing_invoice_with_message_paths ( ) {
3011
- let expanded_key = ExpandedKey :: new ( & KeyMaterial ( [ 42 ; 32 ] ) ) ;
3010
+ let expanded_key = ExpandedKey :: new ( [ 42 ; 32 ] ) ;
3012
3011
let entropy = FixedEntropy { } ;
3013
3012
let nonce = Nonce :: from_entropy_source ( & entropy) ;
3014
3013
let secp_ctx = Secp256k1 :: new ( ) ;
0 commit comments