@@ -7978,11 +7978,24 @@ impl<SP: Deref> OutboundV1Channel<SP> where SP::Target: SignerProvider {
7978
7978
/// Indicates that the signer may have some signatures for us, so we should retry if we're
7979
7979
/// blocked.
7980
7980
#[cfg(async_signing)]
7981
- pub fn signer_maybe_unblocked<L: Deref>(&mut self, logger: &L) -> Option<msgs::FundingCreated> where L::Target: Logger {
7982
- if self.context.signer_pending_funding && self.context.is_outbound() {
7983
- log_trace!(logger, "Signer unblocked a funding_created");
7981
+ pub fn signer_maybe_unblocked<L: Deref>(&mut self, chain_hash: ChainHash, logger: &L) -> (Option<msgs::OpenChannel>, Option<msgs::FundingCreated>)
7982
+ where L::Target: Logger
7983
+ {
7984
+ // If we were pending a commitment point, retry the signer and advance to an
7985
+ // available state.
7986
+ if !self.context.holder_commitment_point.is_available() {
7987
+ self.context.holder_commitment_point.try_resolve_pending(&self.context.holder_signer, &self.context.secp_ctx, logger);
7988
+ }
7989
+ let open_channel = if self.signer_pending_open_channel && self.context.holder_commitment_point.is_available() {
7990
+ log_trace!(logger, "Attempting to generate open_channel...");
7991
+ self.get_open_channel(chain_hash, logger)
7992
+ } else { None };
7993
+ let funding_created = if self.context.signer_pending_funding && self.context.is_outbound() {
7994
+ log_trace!(logger, "Attempting to generate pending funding created...");
7995
+ self.context.signer_pending_funding = false;
7984
7996
self.get_funding_created_msg(logger)
7985
- } else { None }
7997
+ } else { None };
7998
+ (open_channel, funding_created)
7986
7999
}
7987
8000
}
7988
8001
0 commit comments