@@ -4292,18 +4292,20 @@ where
4292
4292
predicted_fee_sat: ret.commit_tx_fee_sat,
4293
4293
};
4294
4294
} else {
4295
- let predicted_stats = SpecTxBuilder {}.get_next_commitment_stats(
4296
- true,
4297
- funding.is_outbound(),
4298
- funding.get_value_satoshis(),
4299
- next_value_to_self_msat,
4300
- &next_commitment_htlcs,
4301
- 0,
4302
- feerate_per_kw,
4303
- dust_exposure_limiting_feerate,
4304
- self.holder_dust_limit_satoshis,
4305
- funding.get_channel_type(),
4306
- )?;
4295
+ let predicted_stats = SpecTxBuilder {}
4296
+ .get_next_commitment_stats(
4297
+ true,
4298
+ funding.is_outbound(),
4299
+ funding.get_value_satoshis(),
4300
+ next_value_to_self_msat,
4301
+ &next_commitment_htlcs,
4302
+ 0,
4303
+ feerate_per_kw,
4304
+ dust_exposure_limiting_feerate,
4305
+ self.holder_dust_limit_satoshis,
4306
+ funding.get_channel_type(),
4307
+ )
4308
+ .expect("Balance after HTLCs and anchors exhausted on local commitment");
4307
4309
*funding.next_local_fee.lock().unwrap() = PredictedNextFee {
4308
4310
predicted_feerate: feerate_per_kw,
4309
4311
predicted_nondust_htlc_count: predicted_stats.nondust_htlc_count,
@@ -4349,18 +4351,20 @@ where
4349
4351
predicted_fee_sat: ret.commit_tx_fee_sat,
4350
4352
};
4351
4353
} else {
4352
- let predicted_stats = SpecTxBuilder {}.get_next_commitment_stats(
4353
- false,
4354
- funding.is_outbound(),
4355
- funding.get_value_satoshis(),
4356
- next_value_to_self_msat,
4357
- &next_commitment_htlcs,
4358
- 0,
4359
- feerate_per_kw,
4360
- dust_exposure_limiting_feerate,
4361
- self.counterparty_dust_limit_satoshis,
4362
- funding.get_channel_type(),
4363
- )?;
4354
+ let predicted_stats = SpecTxBuilder {}
4355
+ .get_next_commitment_stats(
4356
+ false,
4357
+ funding.is_outbound(),
4358
+ funding.get_value_satoshis(),
4359
+ next_value_to_self_msat,
4360
+ &next_commitment_htlcs,
4361
+ 0,
4362
+ feerate_per_kw,
4363
+ dust_exposure_limiting_feerate,
4364
+ self.counterparty_dust_limit_satoshis,
4365
+ funding.get_channel_type(),
4366
+ )
4367
+ .expect("Balance after HTLCs and anchors exhausted on remote commitment");
4364
4368
*funding.next_remote_fee.lock().unwrap() = PredictedNextFee {
4365
4369
predicted_feerate: feerate_per_kw,
4366
4370
predicted_nondust_htlc_count: predicted_stats.nondust_htlc_count,
0 commit comments