@@ -51,12 +51,12 @@ pub(crate) struct NextCommitmentStats {
5151#[ rustfmt:: skip]
5252fn excess_fees_on_counterparty_tx_dust_exposure_msat (
5353 next_commitment_htlcs : & [ HTLCAmountDirection ] , dust_buffer_feerate : u32 ,
54- excess_feerate : u32 , broadcaster_dust_limit_satoshis : u64 , dust_htlc_exposure_msat : u64 ,
54+ excess_feerate : u32 , counterparty_dust_limit_satoshis : u64 , dust_htlc_exposure_msat : u64 ,
5555 channel_type : & ChannelTypeFeatures ,
5656) -> ( u64 , u64 ) {
5757
58- let on_counterparty_tx_accepted_nondust_htlcs = next_commitment_htlcs. iter ( ) . filter ( |htlc| !htlc. is_dust ( false , dust_buffer_feerate, broadcaster_dust_limit_satoshis , channel_type) && htlc. outbound ) . count ( ) ;
59- let on_counterparty_tx_offered_nondust_htlcs = next_commitment_htlcs. iter ( ) . filter ( |htlc| !htlc. is_dust ( false , dust_buffer_feerate, broadcaster_dust_limit_satoshis , channel_type) && !htlc. outbound ) . count ( ) ;
58+ let on_counterparty_tx_accepted_nondust_htlcs = next_commitment_htlcs. iter ( ) . filter ( |htlc| !htlc. is_dust ( false , dust_buffer_feerate, counterparty_dust_limit_satoshis , channel_type) && htlc. outbound ) . count ( ) ;
59+ let on_counterparty_tx_offered_nondust_htlcs = next_commitment_htlcs. iter ( ) . filter ( |htlc| !htlc. is_dust ( false , dust_buffer_feerate, counterparty_dust_limit_satoshis , channel_type) && !htlc. outbound ) . count ( ) ;
6060
6161 let commitment_fee_sat = commit_tx_fee_sat ( excess_feerate, on_counterparty_tx_accepted_nondust_htlcs + on_counterparty_tx_offered_nondust_htlcs, channel_type) ;
6262 let second_stage_fees_sat = htlc_tx_fees_sat ( excess_feerate, on_counterparty_tx_accepted_nondust_htlcs, on_counterparty_tx_offered_nondust_htlcs, channel_type) ;
0 commit comments