@@ -1204,7 +1204,8 @@ impl<ChanSigner: ChannelKeys, M: Deref, T: Deref, K: Deref, F: Deref> ChannelMan
1204
1204
/// May generate SendHTLCs message(s) event on success, which should be relayed.
1205
1205
///
1206
1206
/// Each path may have a different return value, and PaymentSendValue may return a Vec with
1207
- /// each entry matching the corresponding-index entry in the route paths.
1207
+ /// each entry matching the corresponding-index entry in the route paths, see
1208
+ /// PaymentSendFailure for more info.
1208
1209
///
1209
1210
/// In general, a path may raise:
1210
1211
/// * APIError::RouteError when an invalid route or forwarding parameter (cltv_delta, fee,
@@ -1298,9 +1299,10 @@ impl<ChanSigner: ChannelKeys, M: Deref, T: Deref, K: Deref, F: Deref> ChannelMan
1298
1299
if let Err ( e) = self . monitor . update_monitor ( chan. get ( ) . get_funding_txo ( ) . unwrap ( ) , monitor_update) {
1299
1300
maybe_break_monitor_err ! ( self , e, channel_state, chan, RAACommitmentOrder :: CommitmentFirst , false , true ) ;
1300
1301
// Note that MonitorUpdateFailed here indicates (per function docs)
1301
- // that we will resent the commitment update once we unfree monitor
1302
- // updating, so we have to take special care that we don't return
1303
- // something else in case we will resend later!
1302
+ // that we will resend the commitment update once monitor updating
1303
+ // is restored. Therefore, we must return an error indicating that
1304
+ // it is unsafe to retry the payment wholesale, which we do in the
1305
+ // next check for MonitorUpdateFailed, below.
1304
1306
check_res_push ! ( Err ( APIError :: MonitorUpdateFailed ) ) ;
1305
1307
}
1306
1308
0 commit comments