@@ -28,7 +28,7 @@ use crate::types::payment::PaymentHash;
2828/// 
2929/// [`ChannelManager::send_payment`]: crate::ln::channelmanager::ChannelManager::send_payment 
3030/// [`ChannelManager::send_preflight_probes`]: crate::ln::channelmanager::ChannelManager::send_preflight_probes 
31- pub  fn  payment_parameters_from_zero_amount_invoice ( 
31+ pub  fn  payment_parameters_from_any_amount_invoice ( 
3232	invoice :  & Bolt11Invoice ,  amount_msat :  u64 , 
3333)  -> Result < ( PaymentHash ,  RecipientOnionFields ,  RouteParameters ) ,  ( ) >  { 
3434	if  invoice. amount_milli_satoshis ( ) . is_some ( )  { 
@@ -45,7 +45,7 @@ pub fn payment_parameters_from_zero_amount_invoice(
4545/// same [`PaymentHash`] has never been paid before. 
4646/// 
4747/// Will always succeed unless the invoice has no amount specified, in which case 
48- /// [`payment_parameters_from_zero_amount_invoice `] should be used. 
48+ /// [`payment_parameters_from_any_amount_invoice `] should be used. 
4949/// 
5050/// [`ChannelManager::send_payment`]: crate::ln::channelmanager::ChannelManager::send_payment 
5151/// [`ChannelManager::send_preflight_probes`]: crate::ln::channelmanager::ChannelManager::send_preflight_probes 
@@ -112,7 +112,7 @@ mod tests {
112112			. build_signed ( |hash| secp_ctx. sign_ecdsa_recoverable ( hash,  & private_key) ) 
113113			. unwrap ( ) ; 
114114
115- 		assert ! ( payment_parameters_from_zero_amount_invoice ( & invoice,  42 ) . is_err( ) ) ; 
115+ 		assert ! ( payment_parameters_from_any_amount_invoice ( & invoice,  42 ) . is_err( ) ) ; 
116116
117117		let  ( hash,  onion,  params)  = payment_parameters_from_invoice ( & invoice) . unwrap ( ) ; 
118118		assert_eq ! ( & hash. 0 [ ..] ,  & payment_hash[ ..] ) ; 
@@ -146,7 +146,7 @@ mod tests {
146146		assert ! ( payment_parameters_from_invoice( & invoice) . is_err( ) ) ; 
147147
148148		let  ( hash,  onion,  params)  =
149- 			payment_parameters_from_zero_amount_invoice ( & invoice,  42 ) . unwrap ( ) ; 
149+ 			payment_parameters_from_any_amount_invoice ( & invoice,  42 ) . unwrap ( ) ; 
150150		assert_eq ! ( & hash. 0 [ ..] ,  & payment_hash[ ..] ) ; 
151151		assert_eq ! ( onion. payment_secret,  Some ( PaymentSecret ( [ 0 ;  32 ] ) ) ) ; 
152152		assert_eq ! ( params. final_value_msat,  42 ) ; 
0 commit comments