- // We want to move towards only using the `PaymentParameters` in the outbound payments
- // map. However, for backwards-compatibility, we still need to support passing the
- // `PaymentParameters` data that was shoved in the HTLC (and given to us via
- // `payment_params`) back to the user.
- let path_last_hop = path.last().expect("Outbound payments must have had a valid path");
- if let Some(params) = payment.get_mut().payment_parameters() {
- retry = Some(RouteParameters {
- payment_params: params.clone(),
- final_value_msat: path_last_hop.fee_msat,
- });
- } else if let Some(params) = payment_params {
- retry = Some(RouteParameters {
- payment_params: params.clone(),
- final_value_msat: path_last_hop.fee_msat,
- });
- }
-
- if payment_is_probe || !is_retryable_now || !payment_retryable || retry.is_none() {