You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
for htlc in self.context.pending_outbound_htlcs.iter() {
5746
5743
if let OutboundHTLCState::LocalAnnounced(_) = htlc.state {
@@ -5763,16 +5760,9 @@ impl<SP: Deref> Channel<SP> where
5763
5760
return Err(APIError::ChannelUnavailable{err: "Cannot begin shutdown while peer is disconnected or we're waiting on a monitor update, maybe force-close instead?".to_owned()});
5764
5761
}
5765
5762
5766
-
// If we haven't funded the channel yet, we don't need to bother ensuring the shutdown
5767
-
// script is set, we just force-close and call it a day.
5768
-
let mut chan_closed = false;
5769
-
if self.context.channel_state & !STATE_FLAGS < ChannelState::FundingSent as u32 {
5770
-
chan_closed = true;
5771
-
}
5772
-
5773
5763
let update_shutdown_script = match self.context.shutdown_scriptpubkey {
5774
5764
Some(_) => false,
5775
-
None if !chan_closed => {
5765
+
None => {
5776
5766
// use override shutdown script if provided
5777
5767
let shutdown_scriptpubkey = match override_shutdown_script {
5778
5768
Some(script) => script,
@@ -5790,25 +5780,11 @@ impl<SP: Deref> Channel<SP> where
0 commit comments