@@ -7934,11 +7934,24 @@ impl<SP: Deref> OutboundV1Channel<SP> where SP::Target: SignerProvider {
7934
7934
/// Indicates that the signer may have some signatures for us, so we should retry if we're
7935
7935
/// blocked.
7936
7936
#[cfg(async_signing)]
7937
- pub fn signer_maybe_unblocked<L: Deref>(&mut self, logger: &L) -> Option<msgs::FundingCreated> where L::Target: Logger {
7938
- if self.context.signer_pending_funding && self.context.is_outbound() {
7939
- log_trace!(logger, "Signer unblocked a funding_created");
7937
+ pub fn signer_maybe_unblocked<L: Deref>(&mut self, chain_hash: ChainHash, logger: &L) -> (Option<msgs::OpenChannel>, Option<msgs::FundingCreated>)
7938
+ where L::Target: Logger
7939
+ {
7940
+ // If we were pending a commitment point, retry the signer and advance to an
7941
+ // available state.
7942
+ if !self.context.holder_commitment_point.is_available() {
7943
+ self.context.holder_commitment_point.try_resolve_pending(&self.context.holder_signer, &self.context.secp_ctx, logger);
7944
+ }
7945
+ let open_channel = if self.signer_pending_open_channel && self.context.holder_commitment_point.is_available() {
7946
+ log_trace!(logger, "Attempting to generate open_channel...");
7947
+ self.get_open_channel(chain_hash, logger)
7948
+ } else { None };
7949
+ let funding_created = if self.context.signer_pending_funding && self.context.is_outbound() {
7950
+ log_trace!(logger, "Attempting to generate pending funding created...");
7951
+ self.context.signer_pending_funding = false;
7940
7952
self.get_funding_created_msg(logger)
7941
- } else { None }
7953
+ } else { None };
7954
+ (open_channel, funding_created)
7942
7955
}
7943
7956
}
7944
7957
0 commit comments