@@ -2317,7 +2317,7 @@ where
2317
2317
monitor_pending_failures: Vec<(HTLCSource, PaymentHash, HTLCFailReason)>,
2318
2318
monitor_pending_finalized_fulfills: Vec<HTLCSource>,
2319
2319
monitor_pending_update_adds: Vec<msgs::UpdateAddHTLC>,
2320
- monitor_pending_tx_signatures: Option<msgs::TxSignatures> ,
2320
+ monitor_pending_tx_signatures: bool ,
2321
2321
2322
2322
/// If we went to send a revoke_and_ack but our signer was unable to give us a signature,
2323
2323
/// we should retry at some point in the future when the signer indicates it may have a
@@ -3275,7 +3275,7 @@ where
3275
3275
monitor_pending_failures: Vec::new(),
3276
3276
monitor_pending_finalized_fulfills: Vec::new(),
3277
3277
monitor_pending_update_adds: Vec::new(),
3278
- monitor_pending_tx_signatures: None ,
3278
+ monitor_pending_tx_signatures: false ,
3279
3279
3280
3280
signer_pending_revoke_and_ack: false,
3281
3281
signer_pending_commitment_update: false,
@@ -3521,7 +3521,7 @@ where
3521
3521
monitor_pending_failures: Vec::new(),
3522
3522
monitor_pending_finalized_fulfills: Vec::new(),
3523
3523
monitor_pending_update_adds: Vec::new(),
3524
- monitor_pending_tx_signatures: None ,
3524
+ monitor_pending_tx_signatures: false ,
3525
3525
3526
3526
signer_pending_revoke_and_ack: false,
3527
3527
signer_pending_commitment_update: false,
@@ -6654,12 +6654,12 @@ where
6654
6654
6655
6655
self.monitor_updating_paused(false, false, false, Vec::new(), Vec::new(), Vec::new());
6656
6656
6657
- if let Some(tx_signatures ) = self.interactive_tx_signing_session.as_mut().and_then(
6657
+ if let Some(_ ) = self.interactive_tx_signing_session.as_mut().and_then(
6658
6658
|session| session.received_commitment_signed()
6659
6659
) {
6660
6660
// We're up first for submitting our tx_signatures, but our monitor has not persisted yet
6661
6661
// so they'll be sent as soon as that's done.
6662
- self.context.monitor_pending_tx_signatures = Some(tx_signatures) ;
6662
+ self.context.monitor_pending_tx_signatures = true ;
6663
6663
}
6664
6664
// Only build the unsigned transaction for signing if there are any holder inputs to actually sign
6665
6665
let funding_tx_opt = self.interactive_tx_signing_session.as_ref().and_then(|session|
@@ -6752,7 +6752,7 @@ where
6752
6752
.expect("Signing session must exist for negotiated pending splice")
6753
6753
.received_commitment_signed();
6754
6754
self.monitor_updating_paused(false, false, false, Vec::new(), Vec::new(), Vec::new());
6755
- self.context.monitor_pending_tx_signatures = tx_signatures;
6755
+ self.context.monitor_pending_tx_signatures = tx_signatures.is_some() ;
6756
6756
6757
6757
Ok(self.push_ret_blockable_mon_update(monitor_update))
6758
6758
}
@@ -7619,7 +7619,7 @@ where
7619
7619
7620
7620
if is_monitor_update_in_progress {
7621
7621
log_debug!(logger, "Not sending tx_signatures: a monitor update is in progress. Setting monitor_pending_tx_signatures.");
7622
- self.context.monitor_pending_tx_signatures = Some(holder_tx_signatures) ;
7622
+ self.context.monitor_pending_tx_signatures = true ;
7623
7623
return Ok(None);
7624
7624
}
7625
7625
return Ok(Some(holder_tx_signatures));
@@ -7698,7 +7698,7 @@ where
7698
7698
// and sets it as pending.
7699
7699
if holder_tx_signatures_opt.is_some() && self.is_awaiting_initial_mon_persist() {
7700
7700
log_debug!(logger, "Not sending tx_signatures: a monitor update is in progress. Setting monitor_pending_tx_signatures.");
7701
- self.context.monitor_pending_tx_signatures = holder_tx_signatures_opt ;
7701
+ self.context.monitor_pending_tx_signatures = true ;
7702
7702
return Ok((None, None));
7703
7703
}
7704
7704
@@ -7957,14 +7957,14 @@ where
7957
7957
// For channels established with V2 establishment we won't send a `tx_signatures` when we're in
7958
7958
// MonitorUpdateInProgress (and we assume the user will never directly broadcast the funding
7959
7959
// transaction and waits for us to do it).
7960
- let tx_signatures = self.context.monitor_pending_tx_signatures.take();
7961
- if tx_signatures.is_some() {
7960
+ let tx_signatures = if self.context.monitor_pending_tx_signatures {
7962
7961
if self.context.channel_state.is_their_tx_signatures_sent() {
7963
7962
self.context.channel_state = ChannelState::AwaitingChannelReady(AwaitingChannelReadyFlags::new());
7964
7963
} else {
7965
7964
self.context.channel_state.set_our_tx_signatures_ready();
7966
7965
}
7967
- }
7966
+ self.interactive_tx_signing_session.as_ref().and_then(|session| session.holder_tx_signatures().clone())
7967
+ } else { None };
7968
7968
7969
7969
if self.context.channel_state.is_peer_disconnected() {
7970
7970
self.context.monitor_pending_revoke_and_ack = false;
@@ -8466,11 +8466,9 @@ where
8466
8466
if self.context.channel_state.is_monitor_update_in_progress() {
8467
8467
// The `monitor_pending_tx_signatures` field should have already been set in `commitment_signed_initial_v2`
8468
8468
// if we were up first for signing and had a monitor update in progress, but check again just in case.
8469
- debug_assert!(self.context.monitor_pending_tx_signatures.is_some() , "monitor_pending_tx_signatures should already be set");
8469
+ debug_assert!(self.context.monitor_pending_tx_signatures, "monitor_pending_tx_signatures should already be set");
8470
8470
log_debug!(logger, "Not sending tx_signatures: a monitor update is in progress. Setting monitor_pending_tx_signatures.");
8471
- if self.context.monitor_pending_tx_signatures.is_none() {
8472
- self.context.monitor_pending_tx_signatures = session.holder_tx_signatures().clone();
8473
- }
8471
+ self.context.monitor_pending_tx_signatures = true;
8474
8472
None
8475
8473
} else {
8476
8474
// If `holder_tx_signatures` is `None` here, the `tx_signatures` message will be sent
@@ -13221,7 +13219,7 @@ where
13221
13219
monitor_pending_failures,
13222
13220
monitor_pending_finalized_fulfills: monitor_pending_finalized_fulfills.unwrap(),
13223
13221
monitor_pending_update_adds: monitor_pending_update_adds.unwrap_or_default(),
13224
- monitor_pending_tx_signatures: None ,
13222
+ monitor_pending_tx_signatures: false ,
13225
13223
13226
13224
signer_pending_revoke_and_ack: false,
13227
13225
signer_pending_commitment_update: false,
0 commit comments