Skip to content

Commit 6aa69ee

Browse files
committed
f Update docs and comment with Val's feedback
1 parent 5e123ef commit 6aa69ee

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

lightning/src/ln/channelmanager.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1204,7 +1204,8 @@ impl<ChanSigner: ChannelKeys, M: Deref, T: Deref, K: Deref, F: Deref> ChannelMan
12041204
/// May generate SendHTLCs message(s) event on success, which should be relayed.
12051205
///
12061206
/// 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.
12081209
///
12091210
/// In general, a path may raise:
12101211
/// * 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
12981299
if let Err(e) = self.monitor.update_monitor(chan.get().get_funding_txo().unwrap(), monitor_update) {
12991300
maybe_break_monitor_err!(self, e, channel_state, chan, RAACommitmentOrder::CommitmentFirst, false, true);
13001301
// 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.
13041306
check_res_push!(Err(APIError::MonitorUpdateFailed));
13051307
}
13061308

0 commit comments

Comments
 (0)