@@ -2640,11 +2640,11 @@ where
2640
2640
/// will be accepted on the given channel, and after additional timeout/the closing of all
2641
2641
/// pending HTLCs, the channel will be closed on chain.
2642
2642
///
2643
- /// * If we are the channel initiator, we will pay between our [`Background `] and
2644
- /// [`ChannelConfig::force_close_avoidance_max_fee_satoshis`] plus our [`Normal`] fee
2645
- /// estimate.
2643
+ /// * If we are the channel initiator, we will pay between our [`ChannelCloseMinimum `] and
2644
+ /// [`ChannelConfig::force_close_avoidance_max_fee_satoshis`] plus our [`NonAnchorChannelFee`]
2645
+ /// fee estimate.
2646
2646
/// * If our counterparty is the channel initiator, we will require a channel closing
2647
- /// transaction feerate of at least our [`Background `] feerate or the feerate which
2647
+ /// transaction feerate of at least our [`ChannelCloseMinimum `] feerate or the feerate which
2648
2648
/// would appear on a force-closure transaction, whichever is lower. We will allow our
2649
2649
/// counterparty to pay as much fee as they'd like, however.
2650
2650
///
@@ -2656,8 +2656,8 @@ where
2656
2656
/// channel.
2657
2657
///
2658
2658
/// [`ChannelConfig::force_close_avoidance_max_fee_satoshis`]: crate::util::config::ChannelConfig::force_close_avoidance_max_fee_satoshis
2659
- /// [`Background `]: crate::chain::chaininterface::ConfirmationTarget::Background
2660
- /// [`Normal `]: crate::chain::chaininterface::ConfirmationTarget::Normal
2659
+ /// [`ChannelCloseMinimum `]: crate::chain::chaininterface::ConfirmationTarget::ChannelCloseMinimum
2660
+ /// [`NonAnchorChannelFee `]: crate::chain::chaininterface::ConfirmationTarget::NonAnchorChannelFee
2661
2661
/// [`SendShutdown`]: crate::events::MessageSendEvent::SendShutdown
2662
2662
pub fn close_channel(&self, channel_id: &ChannelId, counterparty_node_id: &PublicKey) -> Result<(), APIError> {
2663
2663
self.close_channel_internal(channel_id, counterparty_node_id, None, None)
@@ -2671,8 +2671,8 @@ where
2671
2671
/// the channel being closed or not:
2672
2672
/// * If we are the channel initiator, we will pay at least this feerate on the closing
2673
2673
/// transaction. The upper-bound is set by
2674
- /// [`ChannelConfig::force_close_avoidance_max_fee_satoshis`] plus our [`Normal`] fee
2675
- /// estimate (or `target_feerate_sat_per_1000_weight`, if it is greater).
2674
+ /// [`ChannelConfig::force_close_avoidance_max_fee_satoshis`] plus our [`NonAnchorChannelFee`]
2675
+ /// fee estimate (or `target_feerate_sat_per_1000_weight`, if it is greater).
2676
2676
/// * If our counterparty is the channel initiator, we will refuse to accept a channel closure
2677
2677
/// transaction feerate below `target_feerate_sat_per_1000_weight` (or the feerate which
2678
2678
/// will appear on a force-closure transaction, whichever is lower).
@@ -2690,8 +2690,7 @@ where
2690
2690
/// channel.
2691
2691
///
2692
2692
/// [`ChannelConfig::force_close_avoidance_max_fee_satoshis`]: crate::util::config::ChannelConfig::force_close_avoidance_max_fee_satoshis
2693
- /// [`Background`]: crate::chain::chaininterface::ConfirmationTarget::Background
2694
- /// [`Normal`]: crate::chain::chaininterface::ConfirmationTarget::Normal
2693
+ /// [`NonAnchorChannelFee`]: crate::chain::chaininterface::ConfirmationTarget::NonAnchorChannelFee
2695
2694
/// [`SendShutdown`]: crate::events::MessageSendEvent::SendShutdown
2696
2695
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> {
2697
2696
self.close_channel_internal(channel_id, counterparty_node_id, target_feerate_sats_per_1000_weight, shutdown_script)
@@ -4754,8 +4753,8 @@ where
4754
4753
PersistenceNotifierGuard::optionally_notify(self, || {
4755
4754
let mut should_persist = NotifyOption::SkipPersistNoEvents;
4756
4755
4757
- let normal_feerate = self.fee_estimator.bounded_sat_per_1000_weight(ConfirmationTarget::Normal );
4758
- let min_mempool_feerate = self.fee_estimator.bounded_sat_per_1000_weight(ConfirmationTarget::MempoolMinimum );
4756
+ let non_anchor_feerate = self.fee_estimator.bounded_sat_per_1000_weight(ConfirmationTarget::NonAnchorChannelFee );
4757
+ let anchor_feerate = self.fee_estimator.bounded_sat_per_1000_weight(ConfirmationTarget::AnchorChannelFee );
4759
4758
4760
4759
let per_peer_state = self.per_peer_state.read().unwrap();
4761
4760
for (_cp_id, peer_state_mutex) in per_peer_state.iter() {
@@ -4765,9 +4764,9 @@ where
4765
4764
|(chan_id, phase)| if let ChannelPhase::Funded(chan) = phase { Some((chan_id, chan)) } else { None }
4766
4765
) {
4767
4766
let new_feerate = if chan.context.get_channel_type().supports_anchors_zero_fee_htlc_tx() {
4768
- min_mempool_feerate
4767
+ anchor_feerate
4769
4768
} else {
4770
- normal_feerate
4769
+ non_anchor_feerate
4771
4770
};
4772
4771
let chan_needs_persist = self.update_channel_fee(chan_id, chan, new_feerate);
4773
4772
if chan_needs_persist == NotifyOption::DoPersist { should_persist = NotifyOption::DoPersist; }
@@ -4799,8 +4798,8 @@ where
4799
4798
PersistenceNotifierGuard::optionally_notify(self, || {
4800
4799
let mut should_persist = NotifyOption::SkipPersistNoEvents;
4801
4800
4802
- let normal_feerate = self.fee_estimator.bounded_sat_per_1000_weight(ConfirmationTarget::Normal );
4803
- let min_mempool_feerate = self.fee_estimator.bounded_sat_per_1000_weight(ConfirmationTarget::MempoolMinimum );
4801
+ let non_anchor_feerate = self.fee_estimator.bounded_sat_per_1000_weight(ConfirmationTarget::NonAnchorChannelFee );
4802
+ let anchor_feerate = self.fee_estimator.bounded_sat_per_1000_weight(ConfirmationTarget::AnchorChannelFee );
4804
4803
4805
4804
let mut handle_errors: Vec<(Result<(), _>, _)> = Vec::new();
4806
4805
let mut timed_out_mpp_htlcs = Vec::new();
@@ -4847,9 +4846,9 @@ where
4847
4846
match phase {
4848
4847
ChannelPhase::Funded(chan) => {
4849
4848
let new_feerate = if chan.context.get_channel_type().supports_anchors_zero_fee_htlc_tx() {
4850
- min_mempool_feerate
4849
+ anchor_feerate
4851
4850
} else {
4852
- normal_feerate
4851
+ non_anchor_feerate
4853
4852
};
4854
4853
let chan_needs_persist = self.update_channel_fee(chan_id, chan, new_feerate);
4855
4854
if chan_needs_persist == NotifyOption::DoPersist { should_persist = NotifyOption::DoPersist; }
0 commit comments