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() {
5983
5980
if let OutboundHTLCState::LocalAnnounced(_) = htlc.state {
@@ -5998,16 +5995,9 @@ impl<SP: Deref> Channel<SP> where
5998
5995
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()});
5999
5996
}
6000
5997
6001
-
// If we haven't funded the channel yet, we don't need to bother ensuring the shutdown
6002
-
// script is set, we just force-close and call it a day.
6003
-
let mut chan_closed = false;
6004
-
if self.context.channel_state.is_pre_funded_state() {
6005
-
chan_closed = true;
6006
-
}
6007
-
6008
5998
let update_shutdown_script = match self.context.shutdown_scriptpubkey {
6009
5999
Some(_) => false,
6010
-
None if !chan_closed => {
6000
+
None => {
6011
6001
// use override shutdown script if provided
6012
6002
let shutdown_scriptpubkey = match override_shutdown_script {
6013
6003
Some(script) => script,
@@ -6025,25 +6015,11 @@ impl<SP: Deref> Channel<SP> where
0 commit comments