Skip to content

Commit f24ac9e

Browse files
committed
fix broken state comparison (thanks @yuntai!)
1 parent da37a9b commit f24ac9e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ln/channel.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3083,7 +3083,7 @@ impl Channel {
30833083
if (self.channel_state & (ChannelState::PeerDisconnected as u32)) == (ChannelState::PeerDisconnected as u32) {
30843084
panic!("Cannot create commitment tx while disconnected, as send_htlc will have returned an Err so a send_commitment precondition has been violated");
30853085
}
3086-
if (self.channel_state & (ChannelState::MonitorUpdateFailed as u32)) == (ChannelState::PeerDisconnected as u32) {
3086+
if (self.channel_state & (ChannelState::MonitorUpdateFailed as u32)) == (ChannelState::MonitorUpdateFailed as u32) {
30873087
panic!("Cannot create commitment tx while awaiting monitor update unfreeze, as send_htlc will have returned an Err so a send_commitment precondition has been violated");
30883088
}
30893089
let mut have_updates = self.pending_update_fee.is_some();

0 commit comments

Comments
 (0)