@@ -7274,13 +7274,15 @@ where
7274
7274
7275
7275
#[cfg(any(test, fuzzing))]
7276
7276
{
7277
- *self.funding.next_local_commitment_tx_fee_info_cached.lock().unwrap() = None;
7278
- *self.funding.next_remote_commitment_tx_fee_info_cached.lock().unwrap() = None;
7279
- if let Some(pending_splice) = self.pending_splice.as_mut() {
7280
- for funding in pending_splice.pending_funding.iter_mut() {
7281
- *funding.next_local_commitment_tx_fee_info_cached.lock().unwrap() = None;
7282
- *funding.next_remote_commitment_tx_fee_info_cached.lock().unwrap() = None;
7283
- }
7277
+ for funding in core::iter::once(&mut self.funding).chain(
7278
+ self.pending_splice
7279
+ .as_mut()
7280
+ .map(|pending_splice| pending_splice.pending_funding.as_mut_slice())
7281
+ .unwrap_or(&mut [])
7282
+ .iter_mut(),
7283
+ ) {
7284
+ *funding.next_local_commitment_tx_fee_info_cached.lock().unwrap() = None;
7285
+ *funding.next_remote_commitment_tx_fee_info_cached.lock().unwrap() = None;
7284
7286
}
7285
7287
}
7286
7288
@@ -7481,13 +7483,15 @@ where
7481
7483
}
7482
7484
}
7483
7485
7484
- self.funding.value_to_self_msat =
7485
- (self.funding.value_to_self_msat as i64 + value_to_self_msat_diff) as u64;
7486
- if let Some(pending_splice) = self.pending_splice.as_mut() {
7487
- for funding in pending_splice.pending_funding.iter_mut() {
7488
- funding.value_to_self_msat =
7489
- (funding.value_to_self_msat as i64 + value_to_self_msat_diff) as u64;
7490
- }
7486
+ for funding in core::iter::once(&mut self.funding).chain(
7487
+ self.pending_splice
7488
+ .as_mut()
7489
+ .map(|pending_splice| pending_splice.pending_funding.as_mut_slice())
7490
+ .unwrap_or(&mut [])
7491
+ .iter_mut(),
7492
+ ) {
7493
+ funding.value_to_self_msat =
7494
+ (funding.value_to_self_msat as i64 + value_to_self_msat_diff) as u64;
7491
7495
}
7492
7496
7493
7497
if let Some((feerate, update_state)) = self.context.pending_update_fee {
0 commit comments