fix broken state comparison (thanks @yuntai!)
authorMatt Corallo <git@bluematt.me>
Sat, 27 Oct 2018 05:45:15 +0000 (01:45 -0400)
committerMatt Corallo <git@bluematt.me>
Sat, 27 Oct 2018 13:58:10 +0000 (09:58 -0400)
src/ln/channel.rs

index f2b5b3a8882185537224e7a9442eadd7d8c84004..5c04414a2daed0532591fcaf405279fbf2a21bc8 100644 (file)
@@ -3084,7 +3084,7 @@ impl Channel {
                if (self.channel_state & (ChannelState::PeerDisconnected as u32)) == (ChannelState::PeerDisconnected as u32) {
                        panic!("Cannot create commitment tx while disconnected, as send_htlc will have returned an Err so a send_commitment precondition has been violated");
                }
-               if (self.channel_state & (ChannelState::MonitorUpdateFailed as u32)) == (ChannelState::PeerDisconnected as u32) {
+               if (self.channel_state & (ChannelState::MonitorUpdateFailed as u32)) == (ChannelState::MonitorUpdateFailed as u32) {
                        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");
                }
                let mut have_updates = self.pending_update_fee.is_some();