Skip to content

Commit cfaef0e

Browse files
committed
f for code hygene don't update the updateid if not returning one - Jeff
1 parent b9c46a5 commit cfaef0e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lightning/src/ln/channel.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4195,16 +4195,16 @@ impl<Signer: Sign> Channel<Signer> {
41954195
// monitor update to the user, even if we return one).
41964196
// See test_duplicate_chan_id and test_pre_lockin_no_chan_closed_update for more.
41974197
if self.channel_state & (ChannelState::FundingSent as u32 | ChannelState::ChannelFunded as u32 | ChannelState::ShutdownComplete as u32) != 0 {
4198+
self.latest_monitor_update_id += 1;
41984199
Some((funding_txo, ChannelMonitorUpdate {
4199-
update_id: self.latest_monitor_update_id + 1,
4200+
update_id: self.latest_monitor_update_id,
42004201
updates: vec![ChannelMonitorUpdateStep::ChannelForceClosed { should_broadcast }],
42014202
}))
42024203
} else { None }
42034204
} else { None };
42044205

42054206
self.channel_state = ChannelState::ShutdownComplete as u32;
42064207
self.update_time_counter += 1;
4207-
self.latest_monitor_update_id += 1;
42084208
(monitor_update, dropped_outbound_htlcs)
42094209
}
42104210
}

0 commit comments

Comments
 (0)