@@ -190,15 +190,15 @@ macro_rules! refund_builder_methods { (
190190 	/// provided `node_id` is used for the payer id. 
191191 	/// 
192192 	/// Also, sets the metadata when [`RefundBuilder::build`] is called such that it can be used by 
193-  	/// [`Bolt12Invoice::verify `] to determine if the invoice was produced for the refund given an  
194-  	/// [`ExpandedKey`]. However, if [`RefundBuilder::path`] is called, then the metadata must be  
195-  	/// included in each [`BlindedPath`] instead. In this case, use 
193+  	/// [`Bolt12Invoice::verify_using_metadata `] to determine if the invoice was produced for the 
194+  	/// refund given an  [`ExpandedKey`]. However, if [`RefundBuilder::path`] is called, then the 
195+  	/// metadata must be  included in each [`BlindedPath`] instead. In this case, use 
196196 	/// [`Bolt12Invoice::verify_using_payer_data`]. 
197197 	/// 
198198 	/// The `payment_id` is encrypted in the metadata and should be unique. This ensures that only 
199199 	/// one invoice will be paid for the refund and that payments can be uniquely identified. 
200200 	/// 
201-  	/// [`Bolt12Invoice::verify `]: crate::offers::invoice::Bolt12Invoice::verify  
201+  	/// [`Bolt12Invoice::verify_using_metadata `]: crate::offers::invoice::Bolt12Invoice::verify_using_metadata  
202202 	/// [`Bolt12Invoice::verify_using_payer_data`]: crate::offers::invoice::Bolt12Invoice::verify_using_payer_data 
203203 	/// [`ExpandedKey`]: crate::ln::inbound_payment::ExpandedKey 
204204 	pub  fn  deriving_payer_id( 
@@ -1045,7 +1045,7 @@ mod tests {
10451045			. unwrap ( ) 
10461046			. build ( ) . unwrap ( ) 
10471047			. sign ( recipient_sign) . unwrap ( ) ; 
1048- 		match  invoice. verify ( & expanded_key,  & secp_ctx)  { 
1048+ 		match  invoice. verify_using_metadata ( & expanded_key,  & secp_ctx)  { 
10491049			Ok ( payment_id)  => assert_eq ! ( payment_id,  PaymentId ( [ 1 ;  32 ] ) ) , 
10501050			Err ( ( ) )  => panic ! ( "verification failed" ) , 
10511051		} 
@@ -1062,7 +1062,7 @@ mod tests {
10621062			. unwrap ( ) 
10631063			. build ( ) . unwrap ( ) 
10641064			. sign ( recipient_sign) . unwrap ( ) ; 
1065- 		assert ! ( invoice. verify ( & expanded_key,  & secp_ctx) . is_err( ) ) ; 
1065+ 		assert ! ( invoice. verify_using_metadata ( & expanded_key,  & secp_ctx) . is_err( ) ) ; 
10661066
10671067		// Fails verification with altered metadata 
10681068		let  mut  tlv_stream = refund. as_tlv_stream ( ) ; 
@@ -1077,7 +1077,7 @@ mod tests {
10771077			. unwrap ( ) 
10781078			. build ( ) . unwrap ( ) 
10791079			. sign ( recipient_sign) . unwrap ( ) ; 
1080- 		assert ! ( invoice. verify ( & expanded_key,  & secp_ctx) . is_err( ) ) ; 
1080+ 		assert ! ( invoice. verify_using_metadata ( & expanded_key,  & secp_ctx) . is_err( ) ) ; 
10811081	} 
10821082
10831083	#[ test]  
@@ -1110,7 +1110,7 @@ mod tests {
11101110			. unwrap ( ) 
11111111			. build ( ) . unwrap ( ) 
11121112			. sign ( recipient_sign) . unwrap ( ) ; 
1113- 		assert ! ( invoice. verify ( & expanded_key,  & secp_ctx) . is_err( ) ) ; 
1113+ 		assert ! ( invoice. verify_using_metadata ( & expanded_key,  & secp_ctx) . is_err( ) ) ; 
11141114		assert ! ( invoice. verify_using_payer_data( payment_id,  nonce,  & expanded_key,  & secp_ctx) ) ; 
11151115
11161116		// Fails verification with altered fields 
0 commit comments