Skip to content

Commit 1022baf

Browse files
committed
f drop code we dont need anymore
1 parent 13183a6 commit 1022baf

File tree

1 file changed

+1
-18
lines changed

1 file changed

+1
-18
lines changed

lightning/src/ln/channelmanager.rs

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2983,25 +2983,8 @@ macro_rules! locked_close_channel {
29832983
// channel, we need to store the last update_id of it. However, we don't want to insert
29842984
// into the map (which prevents the `PeerState` from being cleaned up) for channels that
29852985
// never even got confirmations (which would open us up to DoS attacks).
2986-
let mut update_id = $channel_context.get_latest_monitor_update_id();
2986+
let update_id = $channel_context.get_latest_monitor_update_id();
29872987
if $channel_context.get_funding_tx_confirmation_height().is_some() || $channel_context.minimum_depth() == Some(0) || update_id > 1 {
2988-
// There may be some pending background events which we have to ignore when setting the
2989-
// latest update ID.
2990-
for event in $self.pending_background_events.lock().unwrap().iter() {
2991-
match event {
2992-
BackgroundEvent::MonitorUpdateRegeneratedOnStartup { counterparty_node_id, channel_id, update, .. } => {
2993-
if *channel_id == $channel_context.channel_id() && *counterparty_node_id == $channel_context.get_counterparty_node_id() {
2994-
update_id = cmp::min(update_id, update.update_id - 1);
2995-
}
2996-
},
2997-
BackgroundEvent::ClosedMonitorUpdateRegeneratedOnStartup(..) => {
2998-
// This is only generated for very old channels which were already closed
2999-
// on startup, so it should never be present for a channel that is closing
3000-
// here.
3001-
},
3002-
BackgroundEvent::MonitorUpdatesComplete { .. } => {},
3003-
}
3004-
}
30052988
let chan_id = $channel_context.channel_id();
30062989
$peer_state.closed_channel_monitor_update_ids.insert(chan_id, update_id);
30072990
}

0 commit comments

Comments
 (0)