@@ -190,15 +190,15 @@ macro_rules! refund_builder_methods { (
190
190
/// provided `node_id` is used for the payer id.
191
191
///
192
192
/// 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
196
196
/// [`Bolt12Invoice::verify_using_payer_data`].
197
197
///
198
198
/// The `payment_id` is encrypted in the metadata and should be unique. This ensures that only
199
199
/// one invoice will be paid for the refund and that payments can be uniquely identified.
200
200
///
201
- /// [`Bolt12Invoice::verify `]: crate::offers::invoice::Bolt12Invoice::verify
201
+ /// [`Bolt12Invoice::verify_using_metadata `]: crate::offers::invoice::Bolt12Invoice::verify_using_metadata
202
202
/// [`Bolt12Invoice::verify_using_payer_data`]: crate::offers::invoice::Bolt12Invoice::verify_using_payer_data
203
203
/// [`ExpandedKey`]: crate::ln::inbound_payment::ExpandedKey
204
204
pub fn deriving_payer_id(
@@ -1045,7 +1045,7 @@ mod tests {
1045
1045
. unwrap ( )
1046
1046
. build ( ) . unwrap ( )
1047
1047
. sign ( recipient_sign) . unwrap ( ) ;
1048
- match invoice. verify ( & expanded_key, & secp_ctx) {
1048
+ match invoice. verify_using_metadata ( & expanded_key, & secp_ctx) {
1049
1049
Ok ( payment_id) => assert_eq ! ( payment_id, PaymentId ( [ 1 ; 32 ] ) ) ,
1050
1050
Err ( ( ) ) => panic ! ( "verification failed" ) ,
1051
1051
}
@@ -1062,7 +1062,7 @@ mod tests {
1062
1062
. unwrap ( )
1063
1063
. build ( ) . unwrap ( )
1064
1064
. 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( ) ) ;
1066
1066
1067
1067
// Fails verification with altered metadata
1068
1068
let mut tlv_stream = refund. as_tlv_stream ( ) ;
@@ -1077,7 +1077,7 @@ mod tests {
1077
1077
. unwrap ( )
1078
1078
. build ( ) . unwrap ( )
1079
1079
. 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( ) ) ;
1081
1081
}
1082
1082
1083
1083
#[ test]
@@ -1110,7 +1110,7 @@ mod tests {
1110
1110
. unwrap ( )
1111
1111
. build ( ) . unwrap ( )
1112
1112
. 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( ) ) ;
1114
1114
assert ! ( invoice. verify_using_payer_data( payment_id, nonce, & expanded_key, & secp_ctx) ) ;
1115
1115
1116
1116
// Fails verification with altered fields
0 commit comments