@@ -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
}
@@ -7664,7 +7664,7 @@ where
7664
7664
7665
7665
if is_monitor_update_in_progress {
7666
7666
log_debug!(logger, "Not sending tx_signatures: a monitor update is in progress. Setting monitor_pending_tx_signatures.");
7667
- self.context.monitor_pending_tx_signatures = Some(holder_tx_signatures) ;
7667
+ self.context.monitor_pending_tx_signatures = true ;
7668
7668
return Ok(None);
7669
7669
}
7670
7670
return Ok(Some(holder_tx_signatures));
@@ -7742,7 +7742,7 @@ where
7742
7742
// and sets it as pending.
7743
7743
if holder_tx_signatures_opt.is_some() && self.is_awaiting_initial_mon_persist() {
7744
7744
log_debug!(logger, "Not sending tx_signatures: a monitor update is in progress. Setting monitor_pending_tx_signatures.");
7745
- self.context.monitor_pending_tx_signatures = holder_tx_signatures_opt ;
7745
+ self.context.monitor_pending_tx_signatures = true ;
7746
7746
return Ok((None, None));
7747
7747
}
7748
7748
@@ -8001,14 +8001,14 @@ where
8001
8001
// For channels established with V2 establishment we won't send a `tx_signatures` when we're in
8002
8002
// MonitorUpdateInProgress (and we assume the user will never directly broadcast the funding
8003
8003
// transaction and waits for us to do it).
8004
- let tx_signatures = self.context.monitor_pending_tx_signatures.take();
8005
- if tx_signatures.is_some() {
8004
+ let tx_signatures = if self.context.monitor_pending_tx_signatures {
8006
8005
if self.context.channel_state.is_their_tx_signatures_sent() {
8007
8006
self.context.channel_state = ChannelState::AwaitingChannelReady(AwaitingChannelReadyFlags::new());
8008
8007
} else {
8009
8008
self.context.channel_state.set_our_tx_signatures_ready();
8010
8009
}
8011
- }
8010
+ self.interactive_tx_signing_session.as_ref().and_then(|session| session.holder_tx_signatures().clone())
8011
+ } else { None };
8012
8012
8013
8013
if self.context.channel_state.is_peer_disconnected() {
8014
8014
self.context.monitor_pending_revoke_and_ack = false;
@@ -8504,11 +8504,9 @@ where
8504
8504
if self.context.channel_state.is_monitor_update_in_progress() {
8505
8505
// The `monitor_pending_tx_signatures` field should have already been set in `commitment_signed_initial_v2`
8506
8506
// if we were up first for signing and had a monitor update in progress, but check again just in case.
8507
- debug_assert!(self.context.monitor_pending_tx_signatures.is_some() , "monitor_pending_tx_signatures should already be set");
8507
+ debug_assert!(self.context.monitor_pending_tx_signatures, "monitor_pending_tx_signatures should already be set");
8508
8508
log_debug!(logger, "Not sending tx_signatures: a monitor update is in progress. Setting monitor_pending_tx_signatures.");
8509
- if self.context.monitor_pending_tx_signatures.is_none() {
8510
- self.context.monitor_pending_tx_signatures = session.holder_tx_signatures().clone();
8511
- }
8509
+ self.context.monitor_pending_tx_signatures = true;
8512
8510
None
8513
8511
} else {
8514
8512
// If `holder_tx_signatures` is `None` here, the `tx_signatures` message will be sent
@@ -13268,7 +13266,7 @@ where
13268
13266
monitor_pending_failures,
13269
13267
monitor_pending_finalized_fulfills: monitor_pending_finalized_fulfills.unwrap(),
13270
13268
monitor_pending_update_adds: monitor_pending_update_adds.unwrap_or_default(),
13271
- monitor_pending_tx_signatures: None ,
13269
+ monitor_pending_tx_signatures: false ,
13272
13270
13273
13271
signer_pending_revoke_and_ack: false,
13274
13272
signer_pending_commitment_update: false,
0 commit comments