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() {
5672
5669
if let OutboundHTLCState::LocalAnnounced(_) = htlc.state {
@@ -5689,16 +5686,9 @@ impl<SP: Deref> Channel<SP> where
5689
5686
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()});
5690
5687
}
5691
5688
5692
-
// If we haven't funded the channel yet, we don't need to bother ensuring the shutdown
5693
-
// script is set, we just force-close and call it a day.
5694
-
let mut chan_closed = false;
5695
-
if self.context.channel_state & !STATE_FLAGS < ChannelState::FundingSent as u32 {
5696
-
chan_closed = true;
5697
-
}
5698
-
5699
5689
let update_shutdown_script = match self.context.shutdown_scriptpubkey {
5700
5690
Some(_) => false,
5701
-
None if !chan_closed => {
5691
+
None => {
5702
5692
// use override shutdown script if provided
5703
5693
let shutdown_scriptpubkey = match override_shutdown_script {
5704
5694
Some(script) => script,
@@ -5716,23 +5706,11 @@ impl<SP: Deref> Channel<SP> where
0 commit comments