@@ -2827,10 +2827,16 @@ impl<Signer: WriteableEcdsaChannelSigner> Channel<Signer> {
28272827 feerate_per_kw as u64 * ( commitment_tx_base_weight ( opt_anchors) + num_htlcs as u64 * COMMITMENT_TX_WEIGHT_PER_HTLC ) / 1000
28282828 }
28292829
2830- // Get the commitment tx fee for the local's (i.e. our) next commitment transaction based on the
2831- // number of pending HTLCs that are on track to be in our next commitment tx, plus an additional
2832- // HTLC if `fee_spike_buffer_htlc` is Some, plus a new HTLC given by `new_htlc_amount`. Dust HTLCs
2833- // are excluded.
2830+ /// Get the commitment tx fee for the local's (i.e. our) next commitment transaction based on the
2831+ /// number of pending HTLCs that are on track to be in our next commitment tx.
2832+ ///
2833+ /// Optionally includes the `HTLCCandidate` given by `htlc` and an additional non-dust HTLC if
2834+ /// `fee_spike_buffer_htlc` is `Some`.
2835+ ///
2836+ /// The first extra HTLC is useful for determining whether we can accept a further HTLC, the
2837+ /// second allows for creating a buffer to ensure a further HTLC can always be accepted/added.
2838+ ///
2839+ /// Dust HTLCs are excluded.
28342840 fn next_local_commit_tx_fee_msat ( & self , htlc : HTLCCandidate , fee_spike_buffer_htlc : Option < ( ) > ) -> u64 {
28352841 assert ! ( self . is_outbound( ) ) ;
28362842
@@ -2924,10 +2930,16 @@ impl<Signer: WriteableEcdsaChannelSigner> Channel<Signer> {
29242930 res
29252931 }
29262932
2927- // Get the commitment tx fee for the remote's next commitment transaction based on the number of
2928- // pending HTLCs that are on track to be in their next commitment tx, plus an additional HTLC if
2929- // `fee_spike_buffer_htlc` is Some, plus a new HTLC given by `new_htlc_amount`. Dust HTLCs are
2930- // excluded.
2933+ /// Get the commitment tx fee for the remote's next commitment transaction based on the number of
2934+ /// pending HTLCs that are on track to be in their next commitment tx
2935+ ///
2936+ /// Optionally includes the `HTLCCandidate` given by `htlc` and an additional non-dust HTLC if
2937+ /// `fee_spike_buffer_htlc` is `Some`.
2938+ ///
2939+ /// The first extra HTLC is useful for determining whether we can accept a further HTLC, the
2940+ /// second allows for creating a buffer to ensure a further HTLC can always be accepted/added.
2941+ ///
2942+ /// Dust HTLCs are excluded.
29312943 fn next_remote_commit_tx_fee_msat ( & self , htlc : HTLCCandidate , fee_spike_buffer_htlc : Option < ( ) > ) -> u64 {
29322944 assert ! ( !self . is_outbound( ) ) ;
29332945
0 commit comments