@@ -5,7 +5,7 @@ use crate::logger::{
55 Logger ,
66} ;
77
8- use lightning:: chain:: chaininterface:: { BroadcasterInterface , ConfirmationTarget , FeeEstimator } ;
8+ use lightning:: chain:: chaininterface:: { BroadcasterInterface , ConfirmationTarget , FeeEstimator , FEERATE_FLOOR_SATS_PER_KW } ;
99use lightning:: chain:: WatchedOutput ;
1010use lightning:: chain:: { Confirm , Filter } ;
1111
@@ -19,9 +19,6 @@ use bitcoin::{BlockHash, Script, Transaction, Txid};
1919use std:: collections:: HashSet ;
2020use std:: sync:: { Arc , Mutex } ;
2121
22- /// The minimum feerate we are allowed to send, as specify by LDK.
23- const MIN_FEERATE : u32 = 253 ;
24-
2522pub struct LdkLiteChainAccess < D >
2623where
2724 D : BatchDatabase ,
@@ -283,7 +280,7 @@ where
283280 let fallback_fee = fallback_fee_from_conf_target ( confirmation_target) ;
284281 self . blockchain
285282 . 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
287284 }
288285}
289286
@@ -325,7 +322,7 @@ fn num_blocks_from_conf_target(confirmation_target: ConfirmationTarget) -> usize
325322
326323fn fallback_fee_from_conf_target ( confirmation_target : ConfirmationTarget ) -> u32 {
327324 match confirmation_target {
328- ConfirmationTarget :: Background => MIN_FEERATE ,
325+ ConfirmationTarget :: Background => FEERATE_FLOOR_SATS_PER_KW ,
329326 ConfirmationTarget :: Normal => 2000 ,
330327 ConfirmationTarget :: HighPriority => 5000 ,
331328 }
0 commit comments