Skip to content

Commit f9bf585

Browse files
committed
Change hops to path`
1 parent 5a7f0cc commit f9bf585

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

lightning-invoice/src/payment.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -504,8 +504,8 @@ where
504504

505505
match send_payment(&route) {
506506
Ok(payment_id) => {
507-
for hops in route.paths {
508-
self.process_path_inflight_htlcs(payment_hash, &hops);
507+
for path in route.paths {
508+
self.process_path_inflight_htlcs(payment_hash, &path);
509509
}
510510
Ok(payment_id)
511511
},
@@ -566,8 +566,8 @@ where
566566

567567
// Takes in a path to have its information stored in `payment_cache`. This is done for paths
568568
// that are pending retry.
569-
fn process_path_inflight_htlcs(&self, payment_hash: PaymentHash, hops: &Vec<RouteHop>) {
570-
let payment_info_route_hops: Vec<PaymentInfoRouteHop> = hops.iter()
569+
fn process_path_inflight_htlcs(&self, payment_hash: PaymentHash, path: &Vec<RouteHop>) {
570+
let payment_info_route_hops: Vec<PaymentInfoRouteHop> = path.iter()
571571
.map(|h| PaymentInfoRouteHop { pubkey: h.pubkey, short_channel_id: h.short_channel_id, fee_msat: h.fee_msat })
572572
.collect();
573573

@@ -577,8 +577,8 @@ where
577577
}
578578

579579
// Find the path we want to remove in `payment_cache`. If it doesn't exist, do nothing.
580-
fn remove_path_inflight_htlcs(&self, payment_hash: PaymentHash, hops: &Vec<RouteHop>) {
581-
let payment_info_route_hops: Vec<PaymentInfoRouteHop> = hops.iter()
580+
fn remove_path_inflight_htlcs(&self, payment_hash: PaymentHash, path: &Vec<RouteHop>) {
581+
let payment_info_route_hops: Vec<PaymentInfoRouteHop> = path.iter()
582582
.map(|h| PaymentInfoRouteHop { pubkey: h.pubkey, short_channel_id: h.short_channel_id, fee_msat: h.fee_msat })
583583
.collect();
584584

0 commit comments

Comments
 (0)