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