@@ -5,7 +5,7 @@ use crate::logger::{
5
5
Logger ,
6
6
} ;
7
7
8
- use lightning:: chain:: chaininterface:: { BroadcasterInterface , ConfirmationTarget , FeeEstimator } ;
8
+ use lightning:: chain:: chaininterface:: { BroadcasterInterface , ConfirmationTarget , FeeEstimator , FEERATE_FLOOR_SATS_PER_KW } ;
9
9
use lightning:: chain:: WatchedOutput ;
10
10
use lightning:: chain:: { Confirm , Filter } ;
11
11
@@ -19,9 +19,6 @@ use bitcoin::{BlockHash, Script, Transaction, Txid};
19
19
use std:: collections:: HashSet ;
20
20
use std:: sync:: { Arc , Mutex } ;
21
21
22
- /// The minimum feerate we are allowed to send, as specify by LDK.
23
- const MIN_FEERATE : u32 = 253 ;
24
-
25
22
pub struct LdkLiteChainAccess < D >
26
23
where
27
24
D : BatchDatabase ,
@@ -283,7 +280,7 @@ where
283
280
let fallback_fee = fallback_fee_from_conf_target ( confirmation_target) ;
284
281
self . blockchain
285
282
. estimate_fee ( num_blocks)
286
- . map_or ( fallback_fee, |fee_rate| ( fee_rate. fee_wu ( 1000 ) as u32 ) . max ( MIN_FEERATE ) ) as u32
283
+ . map_or ( fallback_fee, |fee_rate| ( fee_rate. fee_wu ( 1000 ) as u32 ) . max ( FEERATE_FLOOR_SATS_PER_KW ) ) as u32
287
284
}
288
285
}
289
286
@@ -325,7 +322,7 @@ fn num_blocks_from_conf_target(confirmation_target: ConfirmationTarget) -> usize
325
322
326
323
fn fallback_fee_from_conf_target ( confirmation_target : ConfirmationTarget ) -> u32 {
327
324
match confirmation_target {
328
- ConfirmationTarget :: Background => MIN_FEERATE ,
325
+ ConfirmationTarget :: Background => FEERATE_FLOOR_SATS_PER_KW ,
329
326
ConfirmationTarget :: Normal => 2000 ,
330
327
ConfirmationTarget :: HighPriority => 5000 ,
331
328
}
0 commit comments