File tree 2 files changed +33
-1
lines changed
2 files changed +33
-1
lines changed Original file line number Diff line number Diff line change @@ -8306,6 +8306,29 @@ impl<SP: Deref> InboundV1Channel<SP> where SP::Target: SignerProvider {
8306
8306
8307
8307
Ok((channel, funding_signed, channel_monitor))
8308
8308
}
8309
+
8310
+ /// Indicates that the signer may have some signatures for us, so we should retry if we're
8311
+ /// blocked.
8312
+ #[allow(unused)]
8313
+ pub fn signer_maybe_unblocked<L: Deref>(&mut self, logger: &L) -> Option<msgs::AcceptChannel>
8314
+ where L::Target: Logger
8315
+ {
8316
+ if self.unfunded_context.holder_commitment_point.is_none() {
8317
+ self.unfunded_context.holder_commitment_point = HolderCommitmentPoint::new(&self.context.holder_signer, &self.context.secp_ctx);
8318
+ }
8319
+ if let Some(ref mut point) = self.unfunded_context.holder_commitment_point {
8320
+ if !point.is_available() {
8321
+ point.try_resolve_pending(&self.context.holder_signer, &self.context.secp_ctx, logger);
8322
+ }
8323
+ }
8324
+ match self.unfunded_context.holder_commitment_point {
8325
+ Some(ref mut point) if point.is_available() && self.signer_pending_accept_channel => {
8326
+ log_trace!(logger, "Attempting to generate accept_channel...");
8327
+ self.generate_accept_channel_message(logger)
8328
+ }
8329
+ _ => None
8330
+ }
8331
+ }
8309
8332
}
8310
8333
8311
8334
// A not-yet-funded outbound (from holder) channel using V2 channel establishment.
Original file line number Diff line number Diff line change @@ -8887,7 +8887,16 @@ where
8887
8887
}
8888
8888
None
8889
8889
}
8890
- ChannelPhase::UnfundedInboundV1(_) => None,
8890
+ ChannelPhase::UnfundedInboundV1(chan) => {
8891
+ let logger = WithChannelContext::from(&self.logger, &chan.context, None);
8892
+ if let Some(msg) = chan.signer_maybe_unblocked(&&logger) {
8893
+ pending_msg_events.push(events::MessageSendEvent::SendAcceptChannel {
8894
+ node_id,
8895
+ msg,
8896
+ });
8897
+ }
8898
+ None
8899
+ },
8891
8900
}
8892
8901
};
8893
8902
You can’t perform that action at this time.
0 commit comments