Skip to content

Commit 66dab39

Browse files
committed
Rename CHannel::monitor_update_failed to monitor_updating_paused
1 parent 78b53c0 commit 66dab39

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

3611-
/// Indicates that a ChannelMonitor update failed to be stored by the client and further
3612-
/// updates are partially paused.
3611+
/// Indicates that a ChannelMonitor update is in progress and has not yet been fully persisted.
36133612
/// This must be called immediately after the call which generated the ChannelMonitor update
36143613
/// which failed. The messages which were generated from that call which generated the
36153614
/// monitor update failure must *not* have been sent to the remote end, and must instead
36163615
/// have been dropped. They will be regenerated when monitor_updating_restored is called.
3617-
pub fn monitor_update_failed(&mut self, resend_raa: bool, resend_commitment: bool,
3616+
pub fn monitor_updating_paused(&mut self, resend_raa: bool, resend_commitment: bool,
36183617
resend_channel_ready: bool, mut pending_forwards: Vec<(PendingHTLCInfo, u64)>,
36193618
mut pending_fails: Vec<(HTLCSource, PaymentHash, HTLCFailReason)>,
36203619
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 => {
@@ -4637,7 +4637,7 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
46374637
// hasn't persisted to disk yet - we can't lose money on a transaction that we haven't
46384638
// accepted payment from yet. We do, however, need to wait to send our channel_ready
46394639
// until we have persisted our monitor.
4640-
chan.monitor_update_failed(false, false, channel_ready.is_some(), Vec::new(), Vec::new(), Vec::new());
4640+
chan.monitor_updating_paused(false, false, channel_ready.is_some(), Vec::new(), Vec::new(), Vec::new());
46414641
channel_ready = None; // Don't send the channel_ready now
46424642
},
46434643
}

0 commit comments

Comments
 (0)