@@ -145,9 +145,6 @@ pub(crate) trait TxBuilder {
145
145
dust_exposure_limiting_feerate : Option < u32 > , broadcaster_dust_limit_satoshis : u64 ,
146
146
channel_type : & ChannelTypeFeatures ,
147
147
) -> NextCommitmentStats ;
148
- fn commit_tx_fee_sat (
149
- & self , feerate_per_kw : u32 , nondust_htlc_count : usize , channel_type : & ChannelTypeFeatures ,
150
- ) -> u64 ;
151
148
fn build_commitment_transaction < L : Deref > (
152
149
& self , local : bool , commitment_number : u64 , per_commitment_point : & PublicKey ,
153
150
channel_parameters : & ChannelTransactionParameters , secp_ctx : & Secp256k1 < secp256k1:: All > ,
@@ -404,11 +401,6 @@ impl TxBuilder for SpecTxBuilder {
404
401
extra_nondust_htlc_on_counterparty_tx_dust_exposure_msat,
405
402
}
406
403
}
407
- fn commit_tx_fee_sat (
408
- & self , feerate_per_kw : u32 , nondust_htlc_count : usize , channel_type : & ChannelTypeFeatures ,
409
- ) -> u64 {
410
- commit_tx_fee_sat ( feerate_per_kw, nondust_htlc_count, channel_type)
411
- }
412
404
#[ rustfmt:: skip]
413
405
fn build_commitment_transaction < L : Deref > (
414
406
& self , local : bool , commitment_number : u64 , per_commitment_point : & PublicKey ,
@@ -459,7 +451,7 @@ impl TxBuilder for SpecTxBuilder {
459
451
// The value going to each party MUST be 0 or positive, even if all HTLCs pending in the
460
452
// commitment clear by failure.
461
453
462
- let commit_tx_fee_sat = self . commit_tx_fee_sat ( feerate_per_kw, htlcs_in_tx. len ( ) , & channel_parameters. channel_type_features ) ;
454
+ let commit_tx_fee_sat = commit_tx_fee_sat ( feerate_per_kw, htlcs_in_tx. len ( ) , & channel_parameters. channel_type_features ) ;
463
455
let value_to_self_after_htlcs_msat = value_to_self_msat. checked_sub ( local_htlc_total_msat) . unwrap ( ) ;
464
456
let value_to_remote_after_htlcs_msat =
465
457
( channel_parameters. channel_value_satoshis * 1000 ) . checked_sub ( value_to_self_msat) . unwrap ( ) . checked_sub ( remote_htlc_total_msat) . unwrap ( ) ;
0 commit comments