Skip to content

Commit

Permalink
f - Fix RouteNotFound rename in other places
Browse files Browse the repository at this point in the history
  • Loading branch information
alecchendev committed Apr 4, 2023
1 parent aab6f16 commit 435ca27
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lightning/src/ln/outbound_payment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -643,14 +643,14 @@ impl OutboundPayments {
Ok(route) => route,
Err(e) => {
log_error!(logger, "Failed to find a route on retry, abandoning payment {}: {:#?}", log_bytes!(payment_id.0), e);
self.abandon_payment(payment_id, PaymentFailureReason::FailedRoutingRetry, pending_events);
self.abandon_payment(payment_id, PaymentFailureReason::RouteNotFound, pending_events);
return
}
};
for path in route.paths.iter() {
if path.len() == 0 {
log_error!(logger, "length-0 path in route");
self.abandon_payment(payment_id, PaymentFailureReason::FailedRoutingRetry, pending_events);
self.abandon_payment(payment_id, PaymentFailureReason::RouteNotFound, pending_events);
return
}
}
Expand Down
2 changes: 1 addition & 1 deletion lightning/src/ln/payment_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1761,7 +1761,7 @@ fn do_automatic_retries(test: AutoRetry) {
Event::PaymentFailed { payment_hash: ref ev_payment_hash, payment_id: ref ev_payment_id, reason: ref ev_reason } => {
assert_eq!(payment_hash, *ev_payment_hash);
assert_eq!(PaymentId(payment_hash.0), *ev_payment_id);
assert_eq!(PaymentFailureReason::FailedRoutingRetry, ev_reason.unwrap());
assert_eq!(PaymentFailureReason::RouteNotFound, ev_reason.unwrap());
},
_ => panic!("Unexpected event"),
}
Expand Down

0 comments on commit 435ca27

Please sign in to comment.