Skip to content

Commit 42fbbb7

Browse files
committed
Rename Channel::monitor_update_failed to monitor_updating_paused
1 parent 609fd2a commit 42fbbb7

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

lightning/src/ln/channel.rs

+2-3
Original file line numberDiff line numberDiff line change
@@ -3657,13 +3657,12 @@ impl<Signer: Sign> Channel<Signer> {
36573657
log_trace!(logger, "Peer disconnection resulted in {} remote-announced HTLC drops on channel {}", inbound_drop_count, log_bytes!(self.channel_id()));
36583658
}
36593659

3660-
/// Indicates that a ChannelMonitor update failed to be stored by the client and further
3661-
/// updates are partially paused.
3660+
/// Indicates that a ChannelMonitor update is in progress and has not yet been fully persisted.
36623661
/// This must be called immediately after the call which generated the ChannelMonitor update
36633662
/// which failed. The messages which were generated from that call which generated the
36643663
/// monitor update failure must *not* have been sent to the remote end, and must instead
36653664
/// have been dropped. They will be regenerated when monitor_updating_restored is called.
3666-
pub fn monitor_update_failed(&mut self, resend_raa: bool, resend_commitment: bool,
3665+
pub fn monitor_updating_paused(&mut self, resend_raa: bool, resend_commitment: bool,
36673666
resend_channel_ready: bool, mut pending_forwards: Vec<(PendingHTLCInfo, u64)>,
36683667
mut pending_fails: Vec<(HTLCSource, PaymentHash, HTLCFailReason)>,
36693668
mut pending_finalized_claimed_htlcs: Vec<HTLCSource>

lightning/src/ln/channelmanager.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1368,7 +1368,7 @@ macro_rules! handle_monitor_err {
13681368
if !$resend_raa {
13691369
debug_assert!($action_type == RAACommitmentOrder::CommitmentFirst || !$resend_commitment);
13701370
}
1371-
$chan.monitor_update_failed($resend_raa, $resend_commitment, $resend_channel_ready, $failed_forwards, $failed_fails, $failed_finalized_fulfills);
1371+
$chan.monitor_updating_paused($resend_raa, $resend_commitment, $resend_channel_ready, $failed_forwards, $failed_fails, $failed_finalized_fulfills);
13721372
(Err(MsgHandleErrInternal::from_chan_no_close(ChannelError::Ignore("Failed to update ChannelMonitor".to_owned()), *$chan_id)), false)
13731373
},
13741374
ChannelMonitorUpdateStatus::Completed => {
@@ -4512,7 +4512,7 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
45124512
// hasn't persisted to disk yet - we can't lose money on a transaction that we haven't
45134513
// accepted payment from yet. We do, however, need to wait to send our channel_ready
45144514
// until we have persisted our monitor.
4515-
chan.monitor_update_failed(false, false, channel_ready.is_some(), Vec::new(), Vec::new(), Vec::new());
4515+
chan.monitor_updating_paused(false, false, channel_ready.is_some(), Vec::new(), Vec::new(), Vec::new());
45164516
channel_ready = None; // Don't send the channel_ready now
45174517
},
45184518
}

0 commit comments

Comments
 (0)