Skip to content

Commit 4af2670

Browse files
committed
Rename CHannel::monitor_update_failed to monitor_updating_paused
1 parent 2dd627d commit 4af2670

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
@@ -3592,13 +3592,12 @@ impl<Signer: Sign> Channel<Signer> {
35923592
log_trace!(logger, "Peer disconnection resulted in {} remote-announced HTLC drops on channel {}", inbound_drop_count, log_bytes!(self.channel_id()));
35933593
}
35943594

3595-
/// Indicates that a ChannelMonitor update failed to be stored by the client and further
3596-
/// updates are partially paused.
3595+
/// Indicates that a ChannelMonitor update is in progress and has not yet been fully persisted.
35973596
/// This must be called immediately after the call which generated the ChannelMonitor update
35983597
/// which failed. The messages which were generated from that call which generated the
35993598
/// monitor update failure must *not* have been sent to the remote end, and must instead
36003599
/// have been dropped. They will be regenerated when monitor_updating_restored is called.
3601-
pub fn monitor_update_failed(&mut self, resend_raa: bool, resend_commitment: bool,
3600+
pub fn monitor_updating_paused(&mut self, resend_raa: bool, resend_commitment: bool,
36023601
resend_channel_ready: bool, mut pending_forwards: Vec<(PendingHTLCInfo, u64)>,
36033602
mut pending_fails: Vec<(HTLCSource, PaymentHash, HTLCFailReason)>,
36043603
mut pending_finalized_claimed_htlcs: Vec<HTLCSource>

lightning/src/ln/channelmanager.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1374,7 +1374,7 @@ macro_rules! handle_monitor_err {
13741374
if !$resend_raa {
13751375
debug_assert!($action_type == RAACommitmentOrder::CommitmentFirst || !$resend_commitment);
13761376
}
1377-
$chan.monitor_update_failed($resend_raa, $resend_commitment, $resend_channel_ready, $failed_forwards, $failed_fails, $failed_finalized_fulfills);
1377+
$chan.monitor_updating_paused($resend_raa, $resend_commitment, $resend_channel_ready, $failed_forwards, $failed_fails, $failed_finalized_fulfills);
13781378
(Err(MsgHandleErrInternal::from_chan_no_close(ChannelError::Ignore("Failed to update ChannelMonitor".to_owned()), *$chan_id)), false)
13791379
},
13801380
ChannelMonitorUpdateResult::UpdateComplete => {
@@ -4604,7 +4604,7 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
46044604
// hasn't persisted to disk yet - we can't lose money on a transaction that we haven't
46054605
// accepted payment from yet. We do, however, need to wait to send our channel_ready
46064606
// until we have persisted our monitor.
4607-
chan.monitor_update_failed(false, false, channel_ready.is_some(), Vec::new(), Vec::new(), Vec::new());
4607+
chan.monitor_updating_paused(false, false, channel_ready.is_some(), Vec::new(), Vec::new(), Vec::new());
46084608
channel_ready = None; // Don't send the channel_ready now
46094609
},
46104610
}

0 commit comments

Comments
 (0)