@@ -1605,7 +1605,6 @@ mod tests {
16051605
16061606 use crate :: blinded_path:: BlindedHop ;
16071607 use crate :: blinded_path:: message:: BlindedMessagePath ;
1608- use crate :: sign:: KeyMaterial ;
16091608 use crate :: types:: features:: { Bolt12InvoiceFeatures , InvoiceRequestFeatures , OfferFeatures } ;
16101609 use crate :: ln:: channelmanager:: PaymentId ;
16111610 use crate :: ln:: inbound_payment:: ExpandedKey ;
@@ -1649,7 +1648,7 @@ mod tests {
16491648
16501649 #[ test]
16511650 fn builds_invoice_for_offer_with_defaults ( ) {
1652- let expanded_key = ExpandedKey :: new ( & KeyMaterial ( [ 42 ; 32 ] ) ) ;
1651+ let expanded_key = ExpandedKey :: new ( [ 42 ; 32 ] ) ;
16531652 let entropy = FixedEntropy { } ;
16541653 let nonce = Nonce :: from_entropy_source ( & entropy) ;
16551654 let secp_ctx = Secp256k1 :: new ( ) ;
@@ -1913,7 +1912,7 @@ mod tests {
19131912 #[ cfg( feature = "std" ) ]
19141913 #[ test]
19151914 fn builds_invoice_from_offer_with_expiration ( ) {
1916- let expanded_key = ExpandedKey :: new ( & KeyMaterial ( [ 42 ; 32 ] ) ) ;
1915+ let expanded_key = ExpandedKey :: new ( [ 42 ; 32 ] ) ;
19171916 let entropy = FixedEntropy { } ;
19181917 let nonce = Nonce :: from_entropy_source ( & entropy) ;
19191918 let secp_ctx = Secp256k1 :: new ( ) ;
@@ -1981,7 +1980,7 @@ mod tests {
19811980 #[ test]
19821981 fn builds_invoice_from_offer_using_derived_keys ( ) {
19831982 let node_id = recipient_pubkey ( ) ;
1984- let expanded_key = ExpandedKey :: new ( & KeyMaterial ( [ 42 ; 32 ] ) ) ;
1983+ let expanded_key = ExpandedKey :: new ( [ 42 ; 32 ] ) ;
19851984 let entropy = FixedEntropy { } ;
19861985 let nonce = Nonce :: from_entropy_source ( & entropy) ;
19871986 let secp_ctx = Secp256k1 :: new ( ) ;
@@ -2014,7 +2013,7 @@ mod tests {
20142013 panic ! ( "error building invoice: {:?}" , e) ;
20152014 }
20162015
2017- let expanded_key = ExpandedKey :: new ( & KeyMaterial ( [ 41 ; 32 ] ) ) ;
2016+ let expanded_key = ExpandedKey :: new ( [ 41 ; 32 ] ) ;
20182017 assert ! (
20192018 invoice_request. verify_using_recipient_data( nonce, & expanded_key, & secp_ctx) . is_err( )
20202019 ) ;
@@ -2039,7 +2038,7 @@ mod tests {
20392038
20402039 #[ test]
20412040 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 ] ) ;
20432042 let entropy = FixedEntropy { } ;
20442043 let secp_ctx = Secp256k1 :: new ( ) ;
20452044
@@ -2061,7 +2060,7 @@ mod tests {
20612060 #[ test]
20622061 fn builds_invoice_from_refund_with_path ( ) {
20632062 let node_id = payer_pubkey ( ) ;
2064- let expanded_key = ExpandedKey :: new ( & KeyMaterial ( [ 42 ; 32 ] ) ) ;
2063+ let expanded_key = ExpandedKey :: new ( [ 42 ; 32 ] ) ;
20652064 let entropy = FixedEntropy { } ;
20662065 let secp_ctx = Secp256k1 :: new ( ) ;
20672066
@@ -2090,7 +2089,7 @@ mod tests {
20902089
20912090 #[ test]
20922091 fn builds_invoice_with_relative_expiry ( ) {
2093- let expanded_key = ExpandedKey :: new ( & KeyMaterial ( [ 42 ; 32 ] ) ) ;
2092+ let expanded_key = ExpandedKey :: new ( [ 42 ; 32 ] ) ;
20942093 let entropy = FixedEntropy { } ;
20952094 let nonce = Nonce :: from_entropy_source ( & entropy) ;
20962095 let secp_ctx = Secp256k1 :: new ( ) ;
@@ -2132,7 +2131,7 @@ mod tests {
21322131
21332132 #[ test]
21342133 fn builds_invoice_with_amount_from_request ( ) {
2135- let expanded_key = ExpandedKey :: new ( & KeyMaterial ( [ 42 ; 32 ] ) ) ;
2134+ let expanded_key = ExpandedKey :: new ( [ 42 ; 32 ] ) ;
21362135 let entropy = FixedEntropy { } ;
21372136 let nonce = Nonce :: from_entropy_source ( & entropy) ;
21382137 let secp_ctx = Secp256k1 :: new ( ) ;
@@ -2154,7 +2153,7 @@ mod tests {
21542153
21552154 #[ test]
21562155 fn builds_invoice_with_quantity_from_request ( ) {
2157- let expanded_key = ExpandedKey :: new ( & KeyMaterial ( [ 42 ; 32 ] ) ) ;
2156+ let expanded_key = ExpandedKey :: new ( [ 42 ; 32 ] ) ;
21582157 let entropy = FixedEntropy { } ;
21592158 let nonce = Nonce :: from_entropy_source ( & entropy) ;
21602159 let secp_ctx = Secp256k1 :: new ( ) ;
@@ -2190,7 +2189,7 @@ mod tests {
21902189
21912190 #[ test]
21922191 fn builds_invoice_with_fallback_address ( ) {
2193- let expanded_key = ExpandedKey :: new ( & KeyMaterial ( [ 42 ; 32 ] ) ) ;
2192+ let expanded_key = ExpandedKey :: new ( [ 42 ; 32 ] ) ;
21942193 let entropy = FixedEntropy { } ;
21952194 let nonce = Nonce :: from_entropy_source ( & entropy) ;
21962195 let secp_ctx = Secp256k1 :: new ( ) ;
@@ -2242,7 +2241,7 @@ mod tests {
22422241
22432242 #[ test]
22442243 fn builds_invoice_with_allow_mpp ( ) {
2245- let expanded_key = ExpandedKey :: new ( & KeyMaterial ( [ 42 ; 32 ] ) ) ;
2244+ let expanded_key = ExpandedKey :: new ( [ 42 ; 32 ] ) ;
22462245 let entropy = FixedEntropy { } ;
22472246 let nonce = Nonce :: from_entropy_source ( & entropy) ;
22482247 let secp_ctx = Secp256k1 :: new ( ) ;
@@ -2267,7 +2266,7 @@ mod tests {
22672266
22682267 #[ test]
22692268 fn fails_signing_invoice ( ) {
2270- let expanded_key = ExpandedKey :: new ( & KeyMaterial ( [ 42 ; 32 ] ) ) ;
2269+ let expanded_key = ExpandedKey :: new ( [ 42 ; 32 ] ) ;
22712270 let entropy = FixedEntropy { } ;
22722271 let nonce = Nonce :: from_entropy_source ( & entropy) ;
22732272 let secp_ctx = Secp256k1 :: new ( ) ;
@@ -2302,7 +2301,7 @@ mod tests {
23022301
23032302 #[ test]
23042303 fn parses_invoice_with_payment_paths ( ) {
2305- let expanded_key = ExpandedKey :: new ( & KeyMaterial ( [ 42 ; 32 ] ) ) ;
2304+ let expanded_key = ExpandedKey :: new ( [ 42 ; 32 ] ) ;
23062305 let entropy = FixedEntropy { } ;
23072306 let nonce = Nonce :: from_entropy_source ( & entropy) ;
23082307 let secp_ctx = Secp256k1 :: new ( ) ;
@@ -2362,7 +2361,7 @@ mod tests {
23622361
23632362 #[ test]
23642363 fn parses_invoice_with_created_at ( ) {
2365- let expanded_key = ExpandedKey :: new ( & KeyMaterial ( [ 42 ; 32 ] ) ) ;
2364+ let expanded_key = ExpandedKey :: new ( [ 42 ; 32 ] ) ;
23662365 let entropy = FixedEntropy { } ;
23672366 let nonce = Nonce :: from_entropy_source ( & entropy) ;
23682367 let secp_ctx = Secp256k1 :: new ( ) ;
@@ -2397,7 +2396,7 @@ mod tests {
23972396
23982397 #[ test]
23992398 fn parses_invoice_with_relative_expiry ( ) {
2400- let expanded_key = ExpandedKey :: new ( & KeyMaterial ( [ 42 ; 32 ] ) ) ;
2399+ let expanded_key = ExpandedKey :: new ( [ 42 ; 32 ] ) ;
24012400 let entropy = FixedEntropy { } ;
24022401 let nonce = Nonce :: from_entropy_source ( & entropy) ;
24032402 let secp_ctx = Secp256k1 :: new ( ) ;
@@ -2424,7 +2423,7 @@ mod tests {
24242423
24252424 #[ test]
24262425 fn parses_invoice_with_payment_hash ( ) {
2427- let expanded_key = ExpandedKey :: new ( & KeyMaterial ( [ 42 ; 32 ] ) ) ;
2426+ let expanded_key = ExpandedKey :: new ( [ 42 ; 32 ] ) ;
24282427 let entropy = FixedEntropy { } ;
24292428 let nonce = Nonce :: from_entropy_source ( & entropy) ;
24302429 let secp_ctx = Secp256k1 :: new ( ) ;
@@ -2459,7 +2458,7 @@ mod tests {
24592458
24602459 #[ test]
24612460 fn parses_invoice_with_amount ( ) {
2462- let expanded_key = ExpandedKey :: new ( & KeyMaterial ( [ 42 ; 32 ] ) ) ;
2461+ let expanded_key = ExpandedKey :: new ( [ 42 ; 32 ] ) ;
24632462 let entropy = FixedEntropy { } ;
24642463 let nonce = Nonce :: from_entropy_source ( & entropy) ;
24652464 let secp_ctx = Secp256k1 :: new ( ) ;
@@ -2492,7 +2491,7 @@ mod tests {
24922491
24932492 #[ test]
24942493 fn parses_invoice_with_allow_mpp ( ) {
2495- let expanded_key = ExpandedKey :: new ( & KeyMaterial ( [ 42 ; 32 ] ) ) ;
2494+ let expanded_key = ExpandedKey :: new ( [ 42 ; 32 ] ) ;
24962495 let entropy = FixedEntropy { } ;
24972496 let nonce = Nonce :: from_entropy_source ( & entropy) ;
24982497 let secp_ctx = Secp256k1 :: new ( ) ;
@@ -2523,7 +2522,7 @@ mod tests {
25232522
25242523 #[ test]
25252524 fn parses_invoice_with_fallback_address ( ) {
2526- let expanded_key = ExpandedKey :: new ( & KeyMaterial ( [ 42 ; 32 ] ) ) ;
2525+ let expanded_key = ExpandedKey :: new ( [ 42 ; 32 ] ) ;
25272526 let entropy = FixedEntropy { } ;
25282527 let nonce = Nonce :: from_entropy_source ( & entropy) ;
25292528 let secp_ctx = Secp256k1 :: new ( ) ;
@@ -2587,7 +2586,7 @@ mod tests {
25872586
25882587 #[ test]
25892588 fn parses_invoice_with_node_id ( ) {
2590- let expanded_key = ExpandedKey :: new ( & KeyMaterial ( [ 42 ; 32 ] ) ) ;
2589+ let expanded_key = ExpandedKey :: new ( [ 42 ; 32 ] ) ;
25912590 let entropy = FixedEntropy { } ;
25922591 let nonce = Nonce :: from_entropy_source ( & entropy) ;
25932592 let secp_ctx = Secp256k1 :: new ( ) ;
@@ -2633,7 +2632,7 @@ mod tests {
26332632
26342633 #[ test]
26352634 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 ] ) ;
26372636 let entropy = FixedEntropy { } ;
26382637 let nonce = Nonce :: from_entropy_source ( & entropy) ;
26392638 let secp_ctx = Secp256k1 :: new ( ) ;
@@ -2710,7 +2709,7 @@ mod tests {
27102709
27112710 #[ test]
27122711 fn fails_parsing_invoice_without_signature ( ) {
2713- let expanded_key = ExpandedKey :: new ( & KeyMaterial ( [ 42 ; 32 ] ) ) ;
2712+ let expanded_key = ExpandedKey :: new ( [ 42 ; 32 ] ) ;
27142713 let entropy = FixedEntropy { } ;
27152714 let nonce = Nonce :: from_entropy_source ( & entropy) ;
27162715 let secp_ctx = Secp256k1 :: new ( ) ;
@@ -2735,7 +2734,7 @@ mod tests {
27352734
27362735 #[ test]
27372736 fn fails_parsing_invoice_with_invalid_signature ( ) {
2738- let expanded_key = ExpandedKey :: new ( & KeyMaterial ( [ 42 ; 32 ] ) ) ;
2737+ let expanded_key = ExpandedKey :: new ( [ 42 ; 32 ] ) ;
27392738 let entropy = FixedEntropy { } ;
27402739 let nonce = Nonce :: from_entropy_source ( & entropy) ;
27412740 let secp_ctx = Secp256k1 :: new ( ) ;
@@ -2765,7 +2764,7 @@ mod tests {
27652764
27662765 #[ test]
27672766 fn parses_invoice_with_unknown_tlv_records ( ) {
2768- let expanded_key = ExpandedKey :: new ( & KeyMaterial ( [ 42 ; 32 ] ) ) ;
2767+ let expanded_key = ExpandedKey :: new ( [ 42 ; 32 ] ) ;
27692768 let entropy = FixedEntropy { } ;
27702769 let nonce = Nonce :: from_entropy_source ( & entropy) ;
27712770 let payment_id = PaymentId ( [ 1 ; 32 ] ) ;
@@ -2849,7 +2848,7 @@ mod tests {
28492848
28502849 #[ test]
28512850 fn parses_invoice_with_experimental_tlv_records ( ) {
2852- let expanded_key = ExpandedKey :: new ( & KeyMaterial ( [ 42 ; 32 ] ) ) ;
2851+ let expanded_key = ExpandedKey :: new ( [ 42 ; 32 ] ) ;
28532852 let entropy = FixedEntropy { } ;
28542853 let nonce = Nonce :: from_entropy_source ( & entropy) ;
28552854 let payment_id = PaymentId ( [ 1 ; 32 ] ) ;
@@ -2979,7 +2978,7 @@ mod tests {
29792978
29802979 #[ test]
29812980 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 ] ) ;
29832982 let entropy = FixedEntropy { } ;
29842983 let nonce = Nonce :: from_entropy_source ( & entropy) ;
29852984 let secp_ctx = Secp256k1 :: new ( ) ;
@@ -3008,7 +3007,7 @@ mod tests {
30083007
30093008 #[ test]
30103009 fn fails_parsing_invoice_with_message_paths ( ) {
3011- let expanded_key = ExpandedKey :: new ( & KeyMaterial ( [ 42 ; 32 ] ) ) ;
3010+ let expanded_key = ExpandedKey :: new ( [ 42 ; 32 ] ) ;
30123011 let entropy = FixedEntropy { } ;
30133012 let nonce = Nonce :: from_entropy_source ( & entropy) ;
30143013 let secp_ctx = Secp256k1 :: new ( ) ;
0 commit comments