@@ -116,17 +116,23 @@ where
116116 let mut locked_fee_rate_cache = self . fee_rate_cache . write ( ) . unwrap ( ) ;
117117
118118 let confirmation_targets = vec ! [
119- ConfirmationTarget :: MempoolMinimum ,
120- ConfirmationTarget :: Background ,
121- ConfirmationTarget :: Normal ,
122- ConfirmationTarget :: HighPriority ,
119+ ConfirmationTarget :: OnChainSweep ,
120+ ConfirmationTarget :: MaxAllowedNonAnchorChannelRemoteFee ,
121+ ConfirmationTarget :: MinAllowedAnchorChannelRemoteFee ,
122+ ConfirmationTarget :: MinAllowedNonAnchorChannelRemoteFee ,
123+ ConfirmationTarget :: AnchorChannelFee ,
124+ ConfirmationTarget :: NonAnchorChannelFee ,
125+ ConfirmationTarget :: ChannelCloseMinimum ,
123126 ] ;
124127 for target in confirmation_targets {
125128 let num_blocks = match target {
126- ConfirmationTarget :: MempoolMinimum => 1008 ,
127- ConfirmationTarget :: Background => 12 ,
128- ConfirmationTarget :: Normal => 6 ,
129- ConfirmationTarget :: HighPriority => 3 ,
129+ ConfirmationTarget :: OnChainSweep => 3 ,
130+ ConfirmationTarget :: MaxAllowedNonAnchorChannelRemoteFee => 1 ,
131+ ConfirmationTarget :: MinAllowedAnchorChannelRemoteFee => 1008 ,
132+ ConfirmationTarget :: MinAllowedNonAnchorChannelRemoteFee => 12 ,
133+ ConfirmationTarget :: AnchorChannelFee => 12 ,
134+ ConfirmationTarget :: NonAnchorChannelFee => 6 ,
135+ ConfirmationTarget :: ChannelCloseMinimum => 12 ,
130136 } ;
131137
132138 let est_fee_rate = self . blockchain . estimate_fee ( num_blocks) . await ;
@@ -211,7 +217,7 @@ where
211217 pub ( crate ) fn send_to_address (
212218 & self , address : & bitcoin:: Address , amount_msat_or_drain : Option < u64 > ,
213219 ) -> Result < Txid , Error > {
214- let confirmation_target = ConfirmationTarget :: Normal ;
220+ let confirmation_target = ConfirmationTarget :: NonAnchorChannelFee ;
215221 let fee_rate = self . estimate_fee_rate ( confirmation_target) ;
216222
217223 let tx = {
@@ -284,10 +290,13 @@ where
284290 let locked_fee_rate_cache = self . fee_rate_cache . read ( ) . unwrap ( ) ;
285291
286292 let fallback_sats_kwu = match confirmation_target {
287- ConfirmationTarget :: MempoolMinimum => FEERATE_FLOOR_SATS_PER_KW ,
288- ConfirmationTarget :: Background => 500 ,
289- ConfirmationTarget :: Normal => 2000 ,
290- ConfirmationTarget :: HighPriority => 5000 ,
293+ ConfirmationTarget :: OnChainSweep => 5000 ,
294+ ConfirmationTarget :: MaxAllowedNonAnchorChannelRemoteFee => 25 * 250 ,
295+ ConfirmationTarget :: MinAllowedAnchorChannelRemoteFee => FEERATE_FLOOR_SATS_PER_KW ,
296+ ConfirmationTarget :: MinAllowedNonAnchorChannelRemoteFee => FEERATE_FLOOR_SATS_PER_KW ,
297+ ConfirmationTarget :: AnchorChannelFee => 500 ,
298+ ConfirmationTarget :: NonAnchorChannelFee => 1000 ,
299+ ConfirmationTarget :: ChannelCloseMinimum => 500 ,
291300 } ;
292301
293302 // We'll fall back on this, if we really don't have any other information.
0 commit comments