Skip to content

Commit c656cf6

Browse files
committed
f more consistent var names
1 parent 95155d4 commit c656cf6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lightning-invoice/src/payment.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ where
253253
) -> Result<PaymentId, PaymentError> {
254254
debug_assert!(invoice.amount_milli_satoshis().is_some() ^ amount_msats.is_some());
255255
let payment_hash = PaymentHash(invoice.payment_hash().clone().into_inner());
256-
let failed_paths_data = loop {
256+
let retry_data_payment_id = loop {
257257
let mut payment_cache = self.payment_cache.lock().unwrap();
258258
match payment_cache.entry(payment_hash) {
259259
hash_map::Entry::Vacant(entry) => {
@@ -309,11 +309,11 @@ where
309309
hash_map::Entry::Occupied(_) => return Err(PaymentError::Invoice("payment pending")),
310310
}
311311
};
312-
if let Some((retry, payment_id)) = failed_paths_data {
312+
if let Some((retry_data, payment_id)) = retry_data_payment_id {
313313
// Some paths were sent, even if we failed to send the full MPP value our recipient may
314314
// misbehave and claim the funds, at which point we have to consider the payment sent,
315315
// so return `Ok()` here, ignoring any retry errors.
316-
let _ = self.retry_payment(payment_id, payment_hash, &retry);
316+
let _ = self.retry_payment(payment_id, payment_hash, &retry_data);
317317
Ok(payment_id)
318318
} else {
319319
self.pay_invoice_internal(invoice, amount_msats, retry_count + 1)

0 commit comments

Comments
 (0)