@@ -146,7 +146,7 @@ fn pay_invoice_using_amount<P: Deref>(
146
146
) -> Result < ( ) , PaymentError > where P :: Target : Payer {
147
147
let payment_hash = PaymentHash ( ( * invoice. payment_hash ( ) ) . into_inner ( ) ) ;
148
148
let payment_secret = Some ( * invoice. payment_secret ( ) ) ;
149
- let recipient_info = RecipientOnionFields { payment_secret } ;
149
+ let recipient_onion = RecipientOnionFields { payment_secret } ;
150
150
let mut payment_params = PaymentParameters :: from_node_id ( invoice. recover_payee_pub_key ( ) ,
151
151
invoice. min_final_cltv_expiry_delta ( ) as u32 )
152
152
. with_expiry_time ( expiry_time_from_unix_epoch ( invoice) . as_secs ( ) )
@@ -159,7 +159,7 @@ fn pay_invoice_using_amount<P: Deref>(
159
159
final_value_msat : amount_msats,
160
160
} ;
161
161
162
- payer. send_payment ( payment_hash, recipient_info , payment_id, route_params, retry_strategy)
162
+ payer. send_payment ( payment_hash, recipient_onion , payment_id, route_params, retry_strategy)
163
163
}
164
164
165
165
fn expiry_time_from_unix_epoch ( invoice : & Invoice ) -> Duration {
@@ -183,7 +183,7 @@ trait Payer {
183
183
///
184
184
/// [`Route`]: lightning::routing::router::Route
185
185
fn send_payment (
186
- & self , payment_hash : PaymentHash , recipient_info : RecipientOnionFields ,
186
+ & self , payment_hash : PaymentHash , recipient_onion : RecipientOnionFields ,
187
187
payment_id : PaymentId , route_params : RouteParameters , retry_strategy : Retry
188
188
) -> Result < ( ) , PaymentError > ;
189
189
}
@@ -200,10 +200,10 @@ where
200
200
L :: Target : Logger ,
201
201
{
202
202
fn send_payment (
203
- & self , payment_hash : PaymentHash , recipient_info : RecipientOnionFields ,
203
+ & self , payment_hash : PaymentHash , recipient_onion : RecipientOnionFields ,
204
204
payment_id : PaymentId , route_params : RouteParameters , retry_strategy : Retry
205
205
) -> Result < ( ) , PaymentError > {
206
- self . send_payment ( payment_hash, recipient_info , payment_id, route_params, retry_strategy)
206
+ self . send_payment ( payment_hash, recipient_onion , payment_id, route_params, retry_strategy)
207
207
. map_err ( PaymentError :: Sending )
208
208
}
209
209
}
@@ -250,7 +250,7 @@ mod tests {
250
250
251
251
impl Payer for TestPayer {
252
252
fn send_payment (
253
- & self , _payment_hash : PaymentHash , _recipient_info : RecipientOnionFields ,
253
+ & self , _payment_hash : PaymentHash , _recipient_onion : RecipientOnionFields ,
254
254
_payment_id : PaymentId , route_params : RouteParameters , _retry_strategy : Retry
255
255
) -> Result < ( ) , PaymentError > {
256
256
self . check_value_msats ( Amount ( route_params. final_value_msat ) ) ;
0 commit comments