mirror of
https://github.com/lightningdevkit/rust-lightning.git
synced 2025-03-13 14:52:21 +01:00
Remove unused ClosedMonitorUpdateRegeneratedOnStartup variant
This commit is contained in:
parent
222cd42186
commit
d9721e6f5e
1 changed files with 0 additions and 18 deletions
|
@ -1062,22 +1062,9 @@ impl ClaimablePayments {
|
|||
/// [`ChannelMonitorUpdate`]s are applied.
|
||||
#[derive(Debug)]
|
||||
enum BackgroundEvent {
|
||||
/// Handle a ChannelMonitorUpdate which closes the channel or for an already-closed channel.
|
||||
/// This is only separated from [`Self::MonitorUpdateRegeneratedOnStartup`] as for truly
|
||||
/// ancient [`ChannelMonitor`]s that haven't seen an update since LDK 0.0.118 we may not have
|
||||
/// the counterparty node ID available.
|
||||
///
|
||||
/// Note that any such events are lost on shutdown, so in general they must be updates which
|
||||
/// are regenerated on startup.
|
||||
ClosedMonitorUpdateRegeneratedOnStartup((OutPoint, ChannelId, ChannelMonitorUpdate)),
|
||||
/// Handle a ChannelMonitorUpdate which may or may not close the channel and may unblock the
|
||||
/// channel to continue normal operation.
|
||||
///
|
||||
/// In general this should be used rather than
|
||||
/// [`Self::ClosedMonitorUpdateRegeneratedOnStartup`], however in cases where the
|
||||
/// `counterparty_node_id` is not available as the channel has closed from a [`ChannelMonitor`]
|
||||
/// error the other variant is acceptable.
|
||||
///
|
||||
/// Any such events that exist in [`ChannelManager::pending_background_events`] will *also* be
|
||||
/// tracked in [`PeerState::in_flight_monitor_updates`].
|
||||
///
|
||||
|
@ -6421,11 +6408,6 @@ where
|
|||
|
||||
for event in background_events.drain(..) {
|
||||
match event {
|
||||
BackgroundEvent::ClosedMonitorUpdateRegeneratedOnStartup((_funding_txo, channel_id, update)) => {
|
||||
// The channel has already been closed, so no use bothering to care about the
|
||||
// monitor updating completing.
|
||||
let _ = self.chain_monitor.update_channel(channel_id, &update);
|
||||
},
|
||||
BackgroundEvent::MonitorUpdateRegeneratedOnStartup { counterparty_node_id, funding_txo, channel_id, update } => {
|
||||
self.apply_post_close_monitor_update(counterparty_node_id, channel_id, funding_txo, update);
|
||||
},
|
||||
|
|
Loading…
Add table
Reference in a new issue