@@ -1166,12 +1166,12 @@ pub enum PaymentSendFailure {
1166
1166
/// in over-/re-payment.
1167
1167
///
1168
1168
/// The results here are ordered the same as the paths in the route object which was passed to
1169
- /// send_payment, and any Errs which are not APIError::MonitorUpdateFailed can be safely
1170
- /// retried (though there is currently no API with which to do so) .
1169
+ /// send_payment, and any Errs which are not APIError::MonitorUpdateInProgress can be safely
1170
+ /// retried via [`ChannelManager::retry_payment`] .
1171
1171
///
1172
- /// Any entries which contain Err(APIError::MonitorUpdateFailed ) or Ok(()) MUST NOT be retried
1173
- /// as they will result in over-/re-payment. These HTLCs all either successfully sent (in the
1174
- /// case of Ok(())) or will send once a [`MonitorEvent::Completed`] is provided for the
1172
+ /// Any entries which contain Err(APIError::MonitorUpdateInprogress ) or Ok(()) MUST NOT be
1173
+ /// retried as they will result in over-/re-payment. These HTLCs all either successfully sent
1174
+ /// (in the case of Ok(())) or will send once a [`MonitorEvent::Completed`] is provided for the
1175
1175
/// next-hop channel with the latest update_id.
1176
1176
PartialFailure {
1177
1177
/// The errors themselves, in the same order as the route hops.
@@ -2469,13 +2469,14 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
2469
2469
insert_outbound_payment ! ( ) ;
2470
2470
} ,
2471
2471
( ChannelMonitorUpdateStatus :: InProgress , Err ( _) ) => {
2472
- // Note that MonitorUpdateFailed here indicates (per function docs)
2473
- // that we will resend the commitment update once monitor updating
2474
- // is restored. Therefore, we must return an error indicating that
2475
- // it is unsafe to retry the payment wholesale, which we do in the
2476
- // send_payment check for MonitorUpdateFailed, below.
2472
+ // Note that MonitorUpdateInProgress here indicates (per function
2473
+ // docs) that we will resend the commitment update once monitor
2474
+ // updating completes. Therefore, we must return an error
2475
+ // indicating that it is unsafe to retry the payment wholesale,
2476
+ // which we do in the send_payment check for
2477
+ // MonitorUpdateInProgress, below.
2477
2478
insert_outbound_payment ! ( ) ; // Only do this after possibly break'ing on Perm failure above.
2478
- return Err ( APIError :: MonitorUpdateFailed ) ;
2479
+ return Err ( APIError :: MonitorUpdateInProgress ) ;
2479
2480
} ,
2480
2481
_ => unreachable ! ( ) ,
2481
2482
}
@@ -2526,12 +2527,12 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
2526
2527
/// PaymentSendFailure for more info.
2527
2528
///
2528
2529
/// In general, a path may raise:
2529
- /// * APIError::RouteError when an invalid route or forwarding parameter (cltv_delta, fee,
2530
+ /// * [` APIError::RouteError`] when an invalid route or forwarding parameter (cltv_delta, fee,
2530
2531
/// node public key) is specified.
2531
- /// * APIError::ChannelUnavailable if the next-hop channel is not available for updates
2532
+ /// * [` APIError::ChannelUnavailable`] if the next-hop channel is not available for updates
2532
2533
/// (including due to previous monitor update failure or new permanent monitor update
2533
2534
/// failure).
2534
- /// * APIError::MonitorUpdateFailed if a new monitor update failure prevented sending the
2535
+ /// * [` APIError::MonitorUpdateInProgress`] if a new monitor update failure prevented sending the
2535
2536
/// relevant updates.
2536
2537
///
2537
2538
/// Note that depending on the type of the PaymentSendFailure the HTLC may have been
@@ -2595,8 +2596,8 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
2595
2596
for ( res, path) in results. iter ( ) . zip ( route. paths . iter ( ) ) {
2596
2597
if res. is_ok ( ) { has_ok = true ; }
2597
2598
if res. is_err ( ) { has_err = true ; }
2598
- if let & Err ( APIError :: MonitorUpdateFailed ) = res {
2599
- // MonitorUpdateFailed is inherently unsafe to retry, so we call it a
2599
+ if let & Err ( APIError :: MonitorUpdateInProgress ) = res {
2600
+ // MonitorUpdateInProgress is inherently unsafe to retry, so we call it a
2600
2601
// PartialFailure.
2601
2602
has_err = true ;
2602
2603
has_ok = true ;
0 commit comments