@@ -2354,7 +2354,7 @@ where
2354
2354
monitor_pending_failures: Vec<(HTLCSource, PaymentHash, HTLCFailReason)>,
2355
2355
monitor_pending_finalized_fulfills: Vec<HTLCSource>,
2356
2356
monitor_pending_update_adds: Vec<msgs::UpdateAddHTLC>,
2357
- monitor_pending_tx_signatures: Option<msgs::TxSignatures> ,
2357
+ monitor_pending_tx_signatures: bool ,
2358
2358
2359
2359
/// If we went to send a revoke_and_ack but our signer was unable to give us a signature,
2360
2360
/// we should retry at some point in the future when the signer indicates it may have a
@@ -3297,7 +3297,7 @@ where
3297
3297
monitor_pending_failures: Vec::new(),
3298
3298
monitor_pending_finalized_fulfills: Vec::new(),
3299
3299
monitor_pending_update_adds: Vec::new(),
3300
- monitor_pending_tx_signatures: None ,
3300
+ monitor_pending_tx_signatures: false ,
3301
3301
3302
3302
signer_pending_revoke_and_ack: false,
3303
3303
signer_pending_commitment_update: false,
@@ -3543,7 +3543,7 @@ where
3543
3543
monitor_pending_failures: Vec::new(),
3544
3544
monitor_pending_finalized_fulfills: Vec::new(),
3545
3545
monitor_pending_update_adds: Vec::new(),
3546
- monitor_pending_tx_signatures: None ,
3546
+ monitor_pending_tx_signatures: false ,
3547
3547
3548
3548
signer_pending_revoke_and_ack: false,
3549
3549
signer_pending_commitment_update: false,
@@ -6687,12 +6687,12 @@ where
6687
6687
6688
6688
self.monitor_updating_paused(false, false, false, Vec::new(), Vec::new(), Vec::new());
6689
6689
6690
- if let Some(tx_signatures ) = self.interactive_tx_signing_session.as_mut().and_then(
6690
+ if let Some(_ ) = self.interactive_tx_signing_session.as_mut().and_then(
6691
6691
|session| session.received_commitment_signed()
6692
6692
) {
6693
6693
// We're up first for submitting our tx_signatures, but our monitor has not persisted yet
6694
6694
// so they'll be sent as soon as that's done.
6695
- self.context.monitor_pending_tx_signatures = Some(tx_signatures) ;
6695
+ self.context.monitor_pending_tx_signatures = true ;
6696
6696
}
6697
6697
// Only build the unsigned transaction for signing if there are any holder inputs to actually sign
6698
6698
let funding_tx_opt = self.interactive_tx_signing_session.as_ref().and_then(|session|
@@ -6785,7 +6785,7 @@ where
6785
6785
.expect("Signing session must exist for negotiated pending splice")
6786
6786
.received_commitment_signed();
6787
6787
self.monitor_updating_paused(false, false, false, Vec::new(), Vec::new(), Vec::new());
6788
- self.context.monitor_pending_tx_signatures = tx_signatures;
6788
+ self.context.monitor_pending_tx_signatures = tx_signatures.is_some() ;
6789
6789
6790
6790
Ok(self.push_ret_blockable_mon_update(monitor_update))
6791
6791
}
@@ -7826,7 +7826,7 @@ where
7826
7826
7827
7827
if is_monitor_update_in_progress {
7828
7828
log_debug!(logger, "Not sending tx_signatures: a monitor update is in progress. Setting monitor_pending_tx_signatures.");
7829
- self.context.monitor_pending_tx_signatures = Some(holder_tx_signatures) ;
7829
+ self.context.monitor_pending_tx_signatures = true ;
7830
7830
return Ok(None);
7831
7831
}
7832
7832
return Ok(Some(holder_tx_signatures));
@@ -7904,7 +7904,7 @@ where
7904
7904
// and sets it as pending.
7905
7905
if holder_tx_signatures_opt.is_some() && self.is_awaiting_initial_mon_persist() {
7906
7906
log_debug!(logger, "Not sending tx_signatures: a monitor update is in progress. Setting monitor_pending_tx_signatures.");
7907
- self.context.monitor_pending_tx_signatures = holder_tx_signatures_opt ;
7907
+ self.context.monitor_pending_tx_signatures = true ;
7908
7908
return Ok((None, None));
7909
7909
}
7910
7910
@@ -8163,14 +8163,14 @@ where
8163
8163
// For channels established with V2 establishment we won't send a `tx_signatures` when we're in
8164
8164
// MonitorUpdateInProgress (and we assume the user will never directly broadcast the funding
8165
8165
// transaction and waits for us to do it).
8166
- let tx_signatures = self.context.monitor_pending_tx_signatures.take();
8167
- if tx_signatures.is_some() {
8166
+ let tx_signatures = if self.context.monitor_pending_tx_signatures {
8168
8167
if self.context.channel_state.is_their_tx_signatures_sent() {
8169
8168
self.context.channel_state = ChannelState::AwaitingChannelReady(AwaitingChannelReadyFlags::new());
8170
8169
} else {
8171
8170
self.context.channel_state.set_our_tx_signatures_ready();
8172
8171
}
8173
- }
8172
+ self.interactive_tx_signing_session.as_ref().and_then(|session| session.holder_tx_signatures().clone())
8173
+ } else { None };
8174
8174
8175
8175
if self.context.channel_state.is_peer_disconnected() {
8176
8176
self.context.monitor_pending_revoke_and_ack = false;
@@ -8666,11 +8666,9 @@ where
8666
8666
if self.context.channel_state.is_monitor_update_in_progress() {
8667
8667
// The `monitor_pending_tx_signatures` field should have already been set in `commitment_signed_initial_v2`
8668
8668
// if we were up first for signing and had a monitor update in progress, but check again just in case.
8669
- debug_assert!(self.context.monitor_pending_tx_signatures.is_some() , "monitor_pending_tx_signatures should already be set");
8669
+ debug_assert!(self.context.monitor_pending_tx_signatures, "monitor_pending_tx_signatures should already be set");
8670
8670
log_debug!(logger, "Not sending tx_signatures: a monitor update is in progress. Setting monitor_pending_tx_signatures.");
8671
- if self.context.monitor_pending_tx_signatures.is_none() {
8672
- self.context.monitor_pending_tx_signatures = session.holder_tx_signatures().clone();
8673
- }
8671
+ self.context.monitor_pending_tx_signatures = true;
8674
8672
None
8675
8673
} else {
8676
8674
// If `holder_tx_signatures` is `None` here, the `tx_signatures` message will be sent
@@ -13436,7 +13434,7 @@ where
13436
13434
monitor_pending_failures,
13437
13435
monitor_pending_finalized_fulfills: monitor_pending_finalized_fulfills.unwrap(),
13438
13436
monitor_pending_update_adds: monitor_pending_update_adds.unwrap_or_default(),
13439
- monitor_pending_tx_signatures: None ,
13437
+ monitor_pending_tx_signatures: false ,
13440
13438
13441
13439
signer_pending_revoke_and_ack: false,
13442
13440
signer_pending_commitment_update: false,
0 commit comments