@@ -116,17 +116,23 @@ where
116
116
let mut locked_fee_rate_cache = self . fee_rate_cache . write ( ) . unwrap ( ) ;
117
117
118
118
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 ,
123
126
] ;
124
127
for target in confirmation_targets {
125
128
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 ,
130
136
} ;
131
137
132
138
let est_fee_rate = self . blockchain . estimate_fee ( num_blocks) . await ;
@@ -211,7 +217,7 @@ where
211
217
pub ( crate ) fn send_to_address (
212
218
& self , address : & bitcoin:: Address , amount_msat_or_drain : Option < u64 > ,
213
219
) -> Result < Txid , Error > {
214
- let confirmation_target = ConfirmationTarget :: Normal ;
220
+ let confirmation_target = ConfirmationTarget :: NonAnchorChannelFee ;
215
221
let fee_rate = self . estimate_fee_rate ( confirmation_target) ;
216
222
217
223
let tx = {
@@ -284,10 +290,13 @@ where
284
290
let locked_fee_rate_cache = self . fee_rate_cache . read ( ) . unwrap ( ) ;
285
291
286
292
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 ,
291
300
} ;
292
301
293
302
// We'll fall back on this, if we really don't have any other information.
0 commit comments