@@ -2315,7 +2315,7 @@ where
2315
2315
monitor_pending_failures: Vec<(HTLCSource, PaymentHash, HTLCFailReason)>,
2316
2316
monitor_pending_finalized_fulfills: Vec<HTLCSource>,
2317
2317
monitor_pending_update_adds: Vec<msgs::UpdateAddHTLC>,
2318
- monitor_pending_tx_signatures: Option<msgs::TxSignatures> ,
2318
+ monitor_pending_tx_signatures: bool ,
2319
2319
2320
2320
/// If we went to send a revoke_and_ack but our signer was unable to give us a signature,
2321
2321
/// we should retry at some point in the future when the signer indicates it may have a
@@ -3258,7 +3258,7 @@ where
3258
3258
monitor_pending_failures: Vec::new(),
3259
3259
monitor_pending_finalized_fulfills: Vec::new(),
3260
3260
monitor_pending_update_adds: Vec::new(),
3261
- monitor_pending_tx_signatures: None ,
3261
+ monitor_pending_tx_signatures: false ,
3262
3262
3263
3263
signer_pending_revoke_and_ack: false,
3264
3264
signer_pending_commitment_update: false,
@@ -3504,7 +3504,7 @@ where
3504
3504
monitor_pending_failures: Vec::new(),
3505
3505
monitor_pending_finalized_fulfills: Vec::new(),
3506
3506
monitor_pending_update_adds: Vec::new(),
3507
- monitor_pending_tx_signatures: None ,
3507
+ monitor_pending_tx_signatures: false ,
3508
3508
3509
3509
signer_pending_revoke_and_ack: false,
3510
3510
signer_pending_commitment_update: false,
@@ -6648,12 +6648,12 @@ where
6648
6648
6649
6649
self.monitor_updating_paused(false, false, false, Vec::new(), Vec::new(), Vec::new());
6650
6650
6651
- if let Some(tx_signatures ) = self.interactive_tx_signing_session.as_mut().and_then(
6651
+ if let Some(_ ) = self.interactive_tx_signing_session.as_mut().and_then(
6652
6652
|session| session.received_commitment_signed()
6653
6653
) {
6654
6654
// We're up first for submitting our tx_signatures, but our monitor has not persisted yet
6655
6655
// so they'll be sent as soon as that's done.
6656
- self.context.monitor_pending_tx_signatures = Some(tx_signatures) ;
6656
+ self.context.monitor_pending_tx_signatures = true ;
6657
6657
}
6658
6658
// Only build the unsigned transaction for signing if there are any holder inputs to actually sign
6659
6659
let funding_tx_opt = self.interactive_tx_signing_session.as_ref().and_then(|session|
@@ -6746,7 +6746,7 @@ where
6746
6746
.expect("Signing session must exist for negotiated pending splice")
6747
6747
.received_commitment_signed();
6748
6748
self.monitor_updating_paused(false, false, false, Vec::new(), Vec::new(), Vec::new());
6749
- self.context.monitor_pending_tx_signatures = tx_signatures;
6749
+ self.context.monitor_pending_tx_signatures = tx_signatures.is_some() ;
6750
6750
6751
6751
Ok(self.push_ret_blockable_mon_update(monitor_update))
6752
6752
}
@@ -7751,7 +7751,7 @@ where
7751
7751
7752
7752
if is_monitor_update_in_progress {
7753
7753
log_debug!(logger, "Not sending tx_signatures: a monitor update is in progress. Setting monitor_pending_tx_signatures.");
7754
- self.context.monitor_pending_tx_signatures = Some(holder_tx_signatures) ;
7754
+ self.context.monitor_pending_tx_signatures = true ;
7755
7755
return Ok(None);
7756
7756
}
7757
7757
return Ok(Some(holder_tx_signatures));
@@ -7829,7 +7829,7 @@ where
7829
7829
// and sets it as pending.
7830
7830
if holder_tx_signatures_opt.is_some() && self.is_awaiting_initial_mon_persist() {
7831
7831
log_debug!(logger, "Not sending tx_signatures: a monitor update is in progress. Setting monitor_pending_tx_signatures.");
7832
- self.context.monitor_pending_tx_signatures = holder_tx_signatures_opt ;
7832
+ self.context.monitor_pending_tx_signatures = true ;
7833
7833
return Ok((None, None));
7834
7834
}
7835
7835
@@ -8088,14 +8088,14 @@ where
8088
8088
// For channels established with V2 establishment we won't send a `tx_signatures` when we're in
8089
8089
// MonitorUpdateInProgress (and we assume the user will never directly broadcast the funding
8090
8090
// transaction and waits for us to do it).
8091
- let tx_signatures = self.context.monitor_pending_tx_signatures.take();
8092
- if tx_signatures.is_some() {
8091
+ let tx_signatures = if self.context.monitor_pending_tx_signatures {
8093
8092
if self.context.channel_state.is_their_tx_signatures_sent() {
8094
8093
self.context.channel_state = ChannelState::AwaitingChannelReady(AwaitingChannelReadyFlags::new());
8095
8094
} else {
8096
8095
self.context.channel_state.set_our_tx_signatures_ready();
8097
8096
}
8098
- }
8097
+ self.interactive_tx_signing_session.as_ref().and_then(|session| session.holder_tx_signatures().clone())
8098
+ } else { None };
8099
8099
8100
8100
if self.context.channel_state.is_peer_disconnected() {
8101
8101
self.context.monitor_pending_revoke_and_ack = false;
@@ -8591,11 +8591,9 @@ where
8591
8591
if self.context.channel_state.is_monitor_update_in_progress() {
8592
8592
// The `monitor_pending_tx_signatures` field should have already been set in `commitment_signed_initial_v2`
8593
8593
// if we were up first for signing and had a monitor update in progress, but check again just in case.
8594
- debug_assert!(self.context.monitor_pending_tx_signatures.is_some() , "monitor_pending_tx_signatures should already be set");
8594
+ debug_assert!(self.context.monitor_pending_tx_signatures, "monitor_pending_tx_signatures should already be set");
8595
8595
log_debug!(logger, "Not sending tx_signatures: a monitor update is in progress. Setting monitor_pending_tx_signatures.");
8596
- if self.context.monitor_pending_tx_signatures.is_none() {
8597
- self.context.monitor_pending_tx_signatures = session.holder_tx_signatures().clone();
8598
- }
8596
+ self.context.monitor_pending_tx_signatures = true;
8599
8597
None
8600
8598
} else {
8601
8599
// If `holder_tx_signatures` is `None` here, the `tx_signatures` message will be sent
@@ -13355,7 +13353,7 @@ where
13355
13353
monitor_pending_failures,
13356
13354
monitor_pending_finalized_fulfills: monitor_pending_finalized_fulfills.unwrap(),
13357
13355
monitor_pending_update_adds: monitor_pending_update_adds.unwrap_or_default(),
13358
- monitor_pending_tx_signatures: None ,
13356
+ monitor_pending_tx_signatures: false ,
13359
13357
13360
13358
signer_pending_revoke_and_ack: false,
13361
13359
signer_pending_commitment_update: false,
0 commit comments