@@ -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
}
@@ -7655,7 +7655,7 @@ where
7655
7655
7656
7656
if is_monitor_update_in_progress {
7657
7657
log_debug!(logger, "Not sending tx_signatures: a monitor update is in progress. Setting monitor_pending_tx_signatures.");
7658
- self.context.monitor_pending_tx_signatures = Some(holder_tx_signatures) ;
7658
+ self.context.monitor_pending_tx_signatures = true ;
7659
7659
return Ok(None);
7660
7660
}
7661
7661
return Ok(Some(holder_tx_signatures));
@@ -7733,7 +7733,7 @@ where
7733
7733
// and sets it as pending.
7734
7734
if holder_tx_signatures_opt.is_some() && self.is_awaiting_initial_mon_persist() {
7735
7735
log_debug!(logger, "Not sending tx_signatures: a monitor update is in progress. Setting monitor_pending_tx_signatures.");
7736
- self.context.monitor_pending_tx_signatures = holder_tx_signatures_opt ;
7736
+ self.context.monitor_pending_tx_signatures = true ;
7737
7737
return Ok((None, None));
7738
7738
}
7739
7739
@@ -7992,14 +7992,14 @@ where
7992
7992
// For channels established with V2 establishment we won't send a `tx_signatures` when we're in
7993
7993
// MonitorUpdateInProgress (and we assume the user will never directly broadcast the funding
7994
7994
// transaction and waits for us to do it).
7995
- let tx_signatures = self.context.monitor_pending_tx_signatures.take();
7996
- if tx_signatures.is_some() {
7995
+ let tx_signatures = if self.context.monitor_pending_tx_signatures {
7997
7996
if self.context.channel_state.is_their_tx_signatures_sent() {
7998
7997
self.context.channel_state = ChannelState::AwaitingChannelReady(AwaitingChannelReadyFlags::new());
7999
7998
} else {
8000
7999
self.context.channel_state.set_our_tx_signatures_ready();
8001
8000
}
8002
- }
8001
+ self.interactive_tx_signing_session.as_ref().and_then(|session| session.holder_tx_signatures().clone())
8002
+ } else { None };
8003
8003
8004
8004
if self.context.channel_state.is_peer_disconnected() {
8005
8005
self.context.monitor_pending_revoke_and_ack = false;
@@ -8495,11 +8495,9 @@ where
8495
8495
if self.context.channel_state.is_monitor_update_in_progress() {
8496
8496
// The `monitor_pending_tx_signatures` field should have already been set in `commitment_signed_initial_v2`
8497
8497
// if we were up first for signing and had a monitor update in progress, but check again just in case.
8498
- debug_assert!(self.context.monitor_pending_tx_signatures.is_some() , "monitor_pending_tx_signatures should already be set");
8498
+ debug_assert!(self.context.monitor_pending_tx_signatures, "monitor_pending_tx_signatures should already be set");
8499
8499
log_debug!(logger, "Not sending tx_signatures: a monitor update is in progress. Setting monitor_pending_tx_signatures.");
8500
- if self.context.monitor_pending_tx_signatures.is_none() {
8501
- self.context.monitor_pending_tx_signatures = session.holder_tx_signatures().clone();
8502
- }
8500
+ self.context.monitor_pending_tx_signatures = true;
8503
8501
None
8504
8502
} else {
8505
8503
// If `holder_tx_signatures` is `None` here, the `tx_signatures` message will be sent
@@ -13265,7 +13263,7 @@ where
13265
13263
monitor_pending_failures,
13266
13264
monitor_pending_finalized_fulfills: monitor_pending_finalized_fulfills.unwrap(),
13267
13265
monitor_pending_update_adds: monitor_pending_update_adds.unwrap_or_default(),
13268
- monitor_pending_tx_signatures: None ,
13266
+ monitor_pending_tx_signatures: false ,
13269
13267
13270
13268
signer_pending_revoke_and_ack: false,
13271
13269
signer_pending_commitment_update: false,
0 commit comments