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
Copy file name to clipboardExpand all lines: lightning/src/ln/channel.rs
+16-10
Original file line number
Diff line number
Diff line change
@@ -5472,8 +5472,11 @@ impl<SP: Deref> Channel<SP> where
5472
5472
let funding_signed = if self.context.signer_pending_funding && !self.context.is_outbound() {
5473
5473
self.context.get_funding_signed_msg(logger).1
5474
5474
} else { None };
5475
-
let channel_ready = if funding_signed.is_some() {
5476
-
self.check_get_channel_ready(0, logger)
5475
+
// Provide a `channel_ready` message if we need to, but only if we're _not_ still pending
5476
+
// funding.
5477
+
let channel_ready = if self.context.signer_pending_channel_ready && !self.context.signer_pending_funding {
5478
+
log_trace!(logger, "Attempting to generate pending channel_ready...");
5479
+
self.get_channel_ready(logger)
5477
5480
} else { None };
5478
5481
5479
5482
let mut commitment_update = if self.context.signer_pending_commitment_update {
@@ -6665,14 +6668,6 @@ impl<SP: Deref> Channel<SP> where
6665
6668
return None;
6666
6669
}
6667
6670
6668
-
// If we're still pending the signature on a funding transaction, then we're not ready to send a
6669
-
// channel_ready yet.
6670
-
if self.context.signer_pending_funding {
6671
-
// TODO: set signer_pending_channel_ready
6672
-
log_debug!(logger, "Can't produce channel_ready: the signer is pending funding.");
6673
-
return None;
6674
-
}
6675
-
6676
6671
// Note that we don't include ChannelState::WaitingForBatch as we don't want to send
6677
6672
// channel_ready until the entire batch is ready.
6678
6673
let need_commitment_update = if matches!(self.context.channel_state, ChannelState::AwaitingChannelReady(f) if f.clone().clear(FundedStateFlags::ALL.into()).is_empty()) {
@@ -6718,6 +6713,17 @@ impl<SP: Deref> Channel<SP> where
6718
6713
return None;
6719
6714
}
6720
6715
6716
+
// If we're still pending the signature on a funding transaction, then we're not ready to send a
6717
+
// channel_ready yet.
6718
+
if self.context.signer_pending_funding {
6719
+
log_debug!(logger, "Can't produce channel_ready: the signer is pending funding.");
6720
+
// We make sure to set the channel ready flag here so that we try to
6721
+
// generate a channel ready for 0conf channels once our signer unblocked
0 commit comments