@@ -9,7 +9,7 @@ use lightning::sign::EntropySource;
99
1010use bitcoin:: blockdata:: constants:: { genesis_block, ChainHash } ;
1111use bitcoin:: blockdata:: transaction:: Transaction ;
12- use bitcoin:: network :: constants :: Network ;
12+ use bitcoin:: Network ;
1313use lightning:: chain:: channelmonitor:: ANTI_REORG_DELAY ;
1414use lightning:: chain:: { chainmonitor, BestBlock , Confirm } ;
1515use lightning:: ln:: channelmanager;
@@ -35,7 +35,7 @@ use lightning::util::test_utils;
3535use lightning_liquidity:: { LiquidityClientConfig , LiquidityManager , LiquidityServiceConfig } ;
3636use lightning_persister:: fs_store:: FilesystemStore ;
3737
38- use std:: collections:: VecDeque ;
38+ use std:: collections:: { HashMap , VecDeque } ;
3939use std:: path:: PathBuf ;
4040use std:: sync:: atomic:: { AtomicBool , Ordering } ;
4141use std:: sync:: mpsc:: SyncSender ;
@@ -143,10 +143,10 @@ impl Drop for Node {
143143}
144144
145145struct Persister {
146- graph_error : Option < ( std :: io:: ErrorKind , & ' static str ) > ,
146+ graph_error : Option < ( lightning :: io:: ErrorKind , & ' static str ) > ,
147147 graph_persistence_notifier : Option < SyncSender < ( ) > > ,
148- manager_error : Option < ( std :: io:: ErrorKind , & ' static str ) > ,
149- scorer_error : Option < ( std :: io:: ErrorKind , & ' static str ) > ,
148+ manager_error : Option < ( lightning :: io:: ErrorKind , & ' static str ) > ,
149+ scorer_error : Option < ( lightning :: io:: ErrorKind , & ' static str ) > ,
150150 kv_store : FilesystemStore ,
151151}
152152
@@ -162,19 +162,19 @@ impl Persister {
162162 }
163163 }
164164
165- fn with_graph_error ( self , error : std :: io:: ErrorKind , message : & ' static str ) -> Self {
165+ fn with_graph_error ( self , error : lightning :: io:: ErrorKind , message : & ' static str ) -> Self {
166166 Self { graph_error : Some ( ( error, message) ) , ..self }
167167 }
168168
169169 fn with_graph_persistence_notifier ( self , sender : SyncSender < ( ) > ) -> Self {
170170 Self { graph_persistence_notifier : Some ( sender) , ..self }
171171 }
172172
173- fn with_manager_error ( self , error : std :: io:: ErrorKind , message : & ' static str ) -> Self {
173+ fn with_manager_error ( self , error : lightning :: io:: ErrorKind , message : & ' static str ) -> Self {
174174 Self { manager_error : Some ( ( error, message) ) , ..self }
175175 }
176176
177- fn with_scorer_error ( self , error : std :: io:: ErrorKind , message : & ' static str ) -> Self {
177+ fn with_scorer_error ( self , error : lightning :: io:: ErrorKind , message : & ' static str ) -> Self {
178178 Self { scorer_error : Some ( ( error, message) ) , ..self }
179179 }
180180}
@@ -194,7 +194,7 @@ impl KVStore for Persister {
194194 && key == CHANNEL_MANAGER_PERSISTENCE_KEY
195195 {
196196 if let Some ( ( error, message) ) = self . manager_error {
197- return Err ( std :: io:: Error :: new ( error, message) ) ;
197+ return Err ( lightning :: io:: Error :: new ( error, message) ) ;
198198 }
199199 }
200200
@@ -212,7 +212,7 @@ impl KVStore for Persister {
212212 } ;
213213
214214 if let Some ( ( error, message) ) = self . graph_error {
215- return Err ( std :: io:: Error :: new ( error, message) ) ;
215+ return Err ( lightning :: io:: Error :: new ( error, message) ) ;
216216 }
217217 }
218218
@@ -221,7 +221,7 @@ impl KVStore for Persister {
221221 && key == SCORER_PERSISTENCE_KEY
222222 {
223223 if let Some ( ( error, message) ) = self . scorer_error {
224- return Err ( std :: io:: Error :: new ( error, message) ) ;
224+ return Err ( lightning :: io:: Error :: new ( error, message) ) ;
225225 }
226226 }
227227
@@ -362,9 +362,6 @@ impl ScoreUpdate for TestScorer {
362362 fn time_passed ( & mut self , _: Duration ) { }
363363}
364364
365- #[ cfg( c_bindings) ]
366- impl lightning:: routing:: scoring:: Score for TestScorer { }
367-
368365impl Drop for TestScorer {
369366 fn drop ( & mut self ) {
370367 if std:: thread:: panicking ( ) {
@@ -390,7 +387,9 @@ pub(crate) fn create_liquidity_node(
390387 client_config : Option < LiquidityClientConfig > ,
391388) -> Node {
392389 let tx_broadcaster = Arc :: new ( test_utils:: TestBroadcaster :: new ( network) ) ;
393- let fee_estimator = Arc :: new ( test_utils:: TestFeeEstimator { sat_per_kw : Mutex :: new ( 253 ) } ) ;
390+ let target_override = Mutex :: new ( HashMap :: new ( ) ) ;
391+ let fee_estimator =
392+ Arc :: new ( test_utils:: TestFeeEstimator { sat_per_kw : Mutex :: new ( 253 ) , target_override } ) ;
394393 let logger = Arc :: new ( test_utils:: TestLogger :: with_id ( format ! ( "node {}" , i) ) ) ;
395394 let genesis_block = genesis_block ( network) ;
396395 let network_graph = Arc :: new ( NetworkGraph :: new ( network, logger. clone ( ) ) ) ;
0 commit comments