@@ -2638,9 +2638,9 @@ where
26382638 /// will be accepted on the given channel, and after additional timeout/the closing of all
26392639 /// pending HTLCs, the channel will be closed on chain.
26402640 ///
2641- /// * If we are the channel initiator, we will pay between our [`Background `] and
2642- /// [`ChannelConfig::force_close_avoidance_max_fee_satoshis`] plus our [`Normal`] fee
2643- /// estimate.
2641+ /// * If we are the channel initiator, we will pay between our [`ChannelCloseMinimum `] and
2642+ /// [`ChannelConfig::force_close_avoidance_max_fee_satoshis`] plus our [`NonAnchorChannelFee`]
2643+ /// fee estimate.
26442644 /// * If our counterparty is the channel initiator, we will require a channel closing
26452645 /// transaction feerate of at least our [`Background`] feerate or the feerate which
26462646 /// would appear on a force-closure transaction, whichever is lower. We will allow our
@@ -2654,8 +2654,8 @@ where
26542654 /// channel.
26552655 ///
26562656 /// [`ChannelConfig::force_close_avoidance_max_fee_satoshis`]: crate::util::config::ChannelConfig::force_close_avoidance_max_fee_satoshis
2657- /// [`Background `]: crate::chain::chaininterface::ConfirmationTarget::Background
2658- /// [`Normal `]: crate::chain::chaininterface::ConfirmationTarget::Normal
2657+ /// [`ChannelCloseMinimum `]: crate::chain::chaininterface::ConfirmationTarget::ChannelCloseMinimum
2658+ /// [`NonAnchorChannelFee `]: crate::chain::chaininterface::ConfirmationTarget::NonAnchorChannelFee
26592659 /// [`SendShutdown`]: crate::events::MessageSendEvent::SendShutdown
26602660 pub fn close_channel(&self, channel_id: &ChannelId, counterparty_node_id: &PublicKey) -> Result<(), APIError> {
26612661 self.close_channel_internal(channel_id, counterparty_node_id, None, None)
@@ -2669,8 +2669,8 @@ where
26692669 /// the channel being closed or not:
26702670 /// * If we are the channel initiator, we will pay at least this feerate on the closing
26712671 /// transaction. The upper-bound is set by
2672- /// [`ChannelConfig::force_close_avoidance_max_fee_satoshis`] plus our [`Normal`] fee
2673- /// estimate (or `target_feerate_sat_per_1000_weight`, if it is greater).
2672+ /// [`ChannelConfig::force_close_avoidance_max_fee_satoshis`] plus our [`NonAnchorChannelFee`]
2673+ /// fee estimate (or `target_feerate_sat_per_1000_weight`, if it is greater).
26742674 /// * If our counterparty is the channel initiator, we will refuse to accept a channel closure
26752675 /// transaction feerate below `target_feerate_sat_per_1000_weight` (or the feerate which
26762676 /// will appear on a force-closure transaction, whichever is lower).
@@ -2688,8 +2688,7 @@ where
26882688 /// channel.
26892689 ///
26902690 /// [`ChannelConfig::force_close_avoidance_max_fee_satoshis`]: crate::util::config::ChannelConfig::force_close_avoidance_max_fee_satoshis
2691- /// [`Background`]: crate::chain::chaininterface::ConfirmationTarget::Background
2692- /// [`Normal`]: crate::chain::chaininterface::ConfirmationTarget::Normal
2691+ /// [`NonAnchorChannelFee`]: crate::chain::chaininterface::ConfirmationTarget::NonAnchorChannelFee
26932692 /// [`SendShutdown`]: crate::events::MessageSendEvent::SendShutdown
26942693 pub fn close_channel_with_feerate_and_script(&self, channel_id: &ChannelId, counterparty_node_id: &PublicKey, target_feerate_sats_per_1000_weight: Option<u32>, shutdown_script: Option<ShutdownScript>) -> Result<(), APIError> {
26952694 self.close_channel_internal(channel_id, counterparty_node_id, target_feerate_sats_per_1000_weight, shutdown_script)
@@ -4752,8 +4751,8 @@ where
47524751 PersistenceNotifierGuard::optionally_notify(self, || {
47534752 let mut should_persist = NotifyOption::SkipPersistNoEvents;
47544753
4755- let normal_feerate = self.fee_estimator.bounded_sat_per_1000_weight(ConfirmationTarget::Normal );
4756- let min_mempool_feerate = self.fee_estimator.bounded_sat_per_1000_weight(ConfirmationTarget::MempoolMinimum );
4754+ let non_anchor_feerate = self.fee_estimator.bounded_sat_per_1000_weight(ConfirmationTarget::NonAnchorChannelFee );
4755+ let anchor_feerate = self.fee_estimator.bounded_sat_per_1000_weight(ConfirmationTarget::AnchorChannelFee );
47574756
47584757 let per_peer_state = self.per_peer_state.read().unwrap();
47594758 for (_cp_id, peer_state_mutex) in per_peer_state.iter() {
@@ -4763,9 +4762,9 @@ where
47634762 |(chan_id, phase)| if let ChannelPhase::Funded(chan) = phase { Some((chan_id, chan)) } else { None }
47644763 ) {
47654764 let new_feerate = if chan.context.get_channel_type().supports_anchors_zero_fee_htlc_tx() {
4766- min_mempool_feerate
4765+ anchor_feerate
47674766 } else {
4768- normal_feerate
4767+ non_anchor_feerate
47694768 };
47704769 let chan_needs_persist = self.update_channel_fee(chan_id, chan, new_feerate);
47714770 if chan_needs_persist == NotifyOption::DoPersist { should_persist = NotifyOption::DoPersist; }
@@ -4797,8 +4796,8 @@ where
47974796 PersistenceNotifierGuard::optionally_notify(self, || {
47984797 let mut should_persist = NotifyOption::SkipPersistNoEvents;
47994798
4800- let normal_feerate = self.fee_estimator.bounded_sat_per_1000_weight(ConfirmationTarget::Normal );
4801- let min_mempool_feerate = self.fee_estimator.bounded_sat_per_1000_weight(ConfirmationTarget::MempoolMinimum );
4799+ let non_anchor_feerate = self.fee_estimator.bounded_sat_per_1000_weight(ConfirmationTarget::NonAnchorChannelFee );
4800+ let anchor_feerate = self.fee_estimator.bounded_sat_per_1000_weight(ConfirmationTarget::AnchorChannelFee );
48024801
48034802 let mut handle_errors: Vec<(Result<(), _>, _)> = Vec::new();
48044803 let mut timed_out_mpp_htlcs = Vec::new();
@@ -4845,9 +4844,9 @@ where
48454844 match phase {
48464845 ChannelPhase::Funded(chan) => {
48474846 let new_feerate = if chan.context.get_channel_type().supports_anchors_zero_fee_htlc_tx() {
4848- min_mempool_feerate
4847+ anchor_feerate
48494848 } else {
4850- normal_feerate
4849+ non_anchor_feerate
48514850 };
48524851 let chan_needs_persist = self.update_channel_fee(chan_id, chan, new_feerate);
48534852 if chan_needs_persist == NotifyOption::DoPersist { should_persist = NotifyOption::DoPersist; }
0 commit comments