@@ -2638,9 +2638,9 @@ where
2638
2638
/// will be accepted on the given channel, and after additional timeout/the closing of all
2639
2639
/// pending HTLCs, the channel will be closed on chain.
2640
2640
///
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.
2644
2644
/// * If our counterparty is the channel initiator, we will require a channel closing
2645
2645
/// transaction feerate of at least our [`Background`] feerate or the feerate which
2646
2646
/// would appear on a force-closure transaction, whichever is lower. We will allow our
@@ -2654,8 +2654,8 @@ where
2654
2654
/// channel.
2655
2655
///
2656
2656
/// [`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
2659
2659
/// [`SendShutdown`]: crate::events::MessageSendEvent::SendShutdown
2660
2660
pub fn close_channel(&self, channel_id: &ChannelId, counterparty_node_id: &PublicKey) -> Result<(), APIError> {
2661
2661
self.close_channel_internal(channel_id, counterparty_node_id, None, None)
@@ -2669,8 +2669,8 @@ where
2669
2669
/// the channel being closed or not:
2670
2670
/// * If we are the channel initiator, we will pay at least this feerate on the closing
2671
2671
/// 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).
2674
2674
/// * If our counterparty is the channel initiator, we will refuse to accept a channel closure
2675
2675
/// transaction feerate below `target_feerate_sat_per_1000_weight` (or the feerate which
2676
2676
/// will appear on a force-closure transaction, whichever is lower).
@@ -2688,8 +2688,7 @@ where
2688
2688
/// channel.
2689
2689
///
2690
2690
/// [`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
2693
2692
/// [`SendShutdown`]: crate::events::MessageSendEvent::SendShutdown
2694
2693
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> {
2695
2694
self.close_channel_internal(channel_id, counterparty_node_id, target_feerate_sats_per_1000_weight, shutdown_script)
@@ -4752,8 +4751,8 @@ where
4752
4751
PersistenceNotifierGuard::optionally_notify(self, || {
4753
4752
let mut should_persist = NotifyOption::SkipPersistNoEvents;
4754
4753
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 );
4757
4756
4758
4757
let per_peer_state = self.per_peer_state.read().unwrap();
4759
4758
for (_cp_id, peer_state_mutex) in per_peer_state.iter() {
@@ -4763,9 +4762,9 @@ where
4763
4762
|(chan_id, phase)| if let ChannelPhase::Funded(chan) = phase { Some((chan_id, chan)) } else { None }
4764
4763
) {
4765
4764
let new_feerate = if chan.context.get_channel_type().supports_anchors_zero_fee_htlc_tx() {
4766
- min_mempool_feerate
4765
+ anchor_feerate
4767
4766
} else {
4768
- normal_feerate
4767
+ non_anchor_feerate
4769
4768
};
4770
4769
let chan_needs_persist = self.update_channel_fee(chan_id, chan, new_feerate);
4771
4770
if chan_needs_persist == NotifyOption::DoPersist { should_persist = NotifyOption::DoPersist; }
@@ -4797,8 +4796,8 @@ where
4797
4796
PersistenceNotifierGuard::optionally_notify(self, || {
4798
4797
let mut should_persist = NotifyOption::SkipPersistNoEvents;
4799
4798
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 );
4802
4801
4803
4802
let mut handle_errors: Vec<(Result<(), _>, _)> = Vec::new();
4804
4803
let mut timed_out_mpp_htlcs = Vec::new();
@@ -4845,9 +4844,9 @@ where
4845
4844
match phase {
4846
4845
ChannelPhase::Funded(chan) => {
4847
4846
let new_feerate = if chan.context.get_channel_type().supports_anchors_zero_fee_htlc_tx() {
4848
- min_mempool_feerate
4847
+ anchor_feerate
4849
4848
} else {
4850
- normal_feerate
4849
+ non_anchor_feerate
4851
4850
};
4852
4851
let chan_needs_persist = self.update_channel_fee(chan_id, chan, new_feerate);
4853
4852
if chan_needs_persist == NotifyOption::DoPersist { should_persist = NotifyOption::DoPersist; }
0 commit comments