Skip to content

Commit c105f24

Browse files
committed
f fix funding_tx_opt check & context.funding_transaction set
1 parent 811e8e9 commit c105f24

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

lightning/src/ln/channel.rs

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6175,11 +6175,8 @@ impl<SP: Deref> FundedChannel<SP> where
61756175

61766176
let (holder_tx_signatures_opt, funding_tx_opt) = signing_session.received_tx_signatures(msg.clone())
61776177
.map_err(|_| ChannelError::Warn("Witness count did not match contributed input count".to_string()))?;
6178-
if holder_tx_signatures_opt.is_some() && self.is_awaiting_initial_mon_persist() {
6179-
log_debug!(logger, "Not sending tx_signatures: a monitor update is in progress. Setting monitor_pending_tx_signatures.");
6180-
self.context.monitor_pending_tx_signatures = holder_tx_signatures_opt;
6181-
return Ok(None);
6182-
}
6178+
6179+
61836180
if funding_tx_opt.is_some() {
61846181
// We have a finalized funding transaction, so we can set the funding transaction and reset the
61856182
// signing session fields.
@@ -6188,6 +6185,12 @@ impl<SP: Deref> FundedChannel<SP> where
61886185
self.interactive_tx_signing_session = None;
61896186
}
61906187

6188+
if holder_tx_signatures_opt.is_some() && self.is_awaiting_initial_mon_persist() {
6189+
log_debug!(logger, "Not sending tx_signatures: a monitor update is in progress. Setting monitor_pending_tx_signatures.");
6190+
self.context.monitor_pending_tx_signatures = holder_tx_signatures_opt;
6191+
return Ok(None);
6192+
}
6193+
61916194
Ok(holder_tx_signatures_opt)
61926195
} else {
61936196
Err(ChannelError::Close((

0 commit comments

Comments
 (0)