Skip to content

Commit 857d363

Browse files
committed
Correct return value for apply_post_close_monitor_update
A recent change accidentally inverted the returned monitor update for the case where an update is applied after the channel has been closed. This commit corrects that mistake.
1 parent ba3d4ff commit 857d363

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lightning/src/ln/channelmanager.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -3866,9 +3866,9 @@ where
38663866
match peer_state.channel_by_id.entry(channel_id) {
38673867
hash_map::Entry::Occupied(mut chan_phase) => {
38683868
if let ChannelPhase::Funded(chan) = chan_phase.get_mut() {
3869-
let in_flight = handle_new_monitor_update!(self, funding_txo,
3869+
let completed = handle_new_monitor_update!(self, funding_txo,
38703870
monitor_update, peer_state_lock, peer_state, per_peer_state, chan);
3871-
return if in_flight { ChannelMonitorUpdateStatus::InProgress } else { ChannelMonitorUpdateStatus::Completed };
3871+
return if completed { ChannelMonitorUpdateStatus::Completed } else { ChannelMonitorUpdateStatus::InProgress };
38723872
} else {
38733873
debug_assert!(false, "We shouldn't have an update for a non-funded channel");
38743874
}

0 commit comments

Comments
 (0)