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() {
5803
5800
if let OutboundHTLCState::LocalAnnounced(_) = htlc.state {
@@ -5820,16 +5817,9 @@ impl<SP: Deref> Channel<SP> where
5820
5817
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()});
5821
5818
}
5822
5819
5823
-
// If we haven't funded the channel yet, we don't need to bother ensuring the shutdown
5824
-
// script is set, we just force-close and call it a day.
5825
-
let mut chan_closed = false;
5826
-
if self.context.channel_state & !STATE_FLAGS < ChannelState::FundingSent as u32 {
5827
-
chan_closed = true;
5828
-
}
5829
-
5830
5820
let update_shutdown_script = match self.context.shutdown_scriptpubkey {
5831
5821
Some(_) => false,
5832
-
None if !chan_closed => {
5822
+
None => {
5833
5823
// use override shutdown script if provided
5834
5824
let shutdown_scriptpubkey = match override_shutdown_script {
5835
5825
Some(script) => script,
@@ -5847,23 +5837,11 @@ impl<SP: Deref> Channel<SP> where
0 commit comments